|
-
Feb 19th, 2008, 10:41 AM
#3
Thread Starter
Fanatic Member
Re: How to implement a List of Diffrent Generic Lists
Goal:
you have severalkind of datacollisions that can occur if you add a piece of data to a Webbased database.
You want to resolve these collisionsin the userinterface.
To do so I came up with a principal solution that was like this:
The dataprovider returns an object called ValidationVioaltionResults with a list of Objects called ValidationVioaltionResult (<- No s at the end)
The ValidationVioaltionResult (<- No s at the end) contains:
- A message Decribing the kind of collision that occured
- A list with
1 the item you want to add
and all items that collided with for this type of collision
The colliding objects can be of diffrent Types. So a generic List needs to be placed in the The ValidationVioaltionResult.List (<- No s at the end)
The challenge I need to adress is either:
-how can I do this without losing the type Store the Type of the list(of T)
in a propperty so i can cast it back to the correct Type in the userinterface
Or
-retreive the Type of this list again so I can Cast The List(Of T)
back into a List(Of Person) for instance.
 why can't programmers keep and 31 Oct and 25 dec apart. Why Rating is Useful
for every question you ask provide an answer on another thread.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|