Populate an array using LINQ

devinine

New member
Joined
Feb 9, 2009
Messages
1
Programming Experience
Beginner
I have an array wherein i have to populate some objects that are not part of another object. For e.g there are objects called viewgroup and membershipgroup.i have to populate the array with viewgroup obj that are not part of the membershipgroup. i need to do this using LINQ in VB.Net. can anyone please tell me how? or show me some sample code? i would really appreciate the help. If am not clear please let me know i ll try to put it in a more understandable way.
 
You would do something like this:
VB.NET:
Dim result = From x In viewgroup Where Not membershipgroup.Contains(x)
 
Back
Top