Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > Other .NET > Generics
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Generics Discussion of the .NET Generics feature common to all Microsoft .NET 2.0 and later languages. Questions specific to an individual language should go in the language forums instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Generics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old August 2nd, 2006, 11:26 PM
Friend of Wrox
Points: 2,376, Level: 20
Points: 2,376, Level: 20 Points: 2,376, Level: 20 Points: 2,376, Level: 20
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: , , Australia.
Posts: 596
Thanks: 1
Thanked 3 Times in 3 Posts
Default Generics Related error in my code, I think???

VS.NET 2005, Windows Forms App, C#

Hi All,
I am using a generic List for the first time and I am getting strange problems with the designer.

I have a user control which has the following generic list property:
        
Code:
private List<BOL.Trip> trips = new List<BOL.Trip>();
Code:
        public List<BOL.Trip> Trips { get { return trips; } set { trips = value; } }


When I add this control to another user control i get the following error in the designer for the consuming Control:

Code:
 One or more errors encountered while loading the designer. The errors are listed below. Some errors can be fixed by rebuilding your project, while others may require code changes. 

Object of type 'DMWhiteboard.BOL.Trip[]' cannot be converted to type 'DMWhiteboard.BOL.Trip[]'.
The project builds with the following warning.
Code:
Warning    1    ResX file Object of type 'DMWhiteboard.BOL.Trip[]' cannot be converted to type 'DMWhiteboard.BOL.Trip[]'. Line 129, position 5. cannot be parsed.        129    0
However there is no line 129 in the resx code file.

Any Assistance would be greatly appreciated.






======================================
They say, best men are molded out of faults,
And, for the most, become much more the better
For being a little bad.
======================================
__________________
======================================
"They say, best men are molded out of faults,
And, for the most, become much more the better
For being a little bad."
--Shakespeare
======================================
Reply With Quote
  #2 (permalink)  
Old August 3rd, 2006, 12:02 AM
Friend of Wrox
Points: 2,376, Level: 20
Points: 2,376, Level: 20 Points: 2,376, Level: 20 Points: 2,376, Level: 20
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: , , Australia.
Posts: 596
Thanks: 1
Thanked 3 Times in 3 Posts
Default

It appeard that the problem was related to the instanciating the List<BOL.Trip> from within seperate classes.
Not sure why or what for, but the creating a class derived from the List<BOL.Trip> enabled me to put use the type definition in both classes.
Many thanks,
Rod

======================================
They say, best men are molded out of faults,
And, for the most, become much more the better
For being a little bad.
======================================
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Generics in 3.0 sikanderwaheed C# 2008 aka C# 3.0 1 May 5th, 2008 08:30 AM
NET Generics FREDYCOREA .NET Framework 3.5 1 February 21st, 2008 09:17 AM
error related to vb6 Rajesh Pachouri Pro VB 6 0 September 16th, 2006 03:14 AM



All times are GMT -4. The time now is 01:47 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.