Good Morning,
I have created a structure to be a cut down version of a Class that I already have.
I am trying to use a linq query to iterate through the list of MyClass and create a List based on the results (A discinct list based on a few of the properties on MyClass). Something like this...
List<MyStructure> thisList = (from MyClass thisClass in List<MyClass>
select thisClass.Property1, thisClass.Property2, thisClass.Property3 Distinct.Cast<MyStructure>()).ToList<MyStructure>();
where MyStructure contains 3 variables of Property1, Property3 and Property3 with the same types.
I am fully aware that the above code wont compile, but that is the sort i am trying to do. Could someone please tell me if this is possible to do?
Thanks