Reputation: 967
How can I subtract List "firstList" from List "secondList" in unity c#. I have found answers to do this with LINQ and HashSet but after reading this and this I am very doubtful to use those. Please point me in right direction because I have to deploy my game on IOS and Android both.
Upvotes: 0
Views: 618
Reputation: 21
"The posts you link to are talking about C#2.0, which does not support LINQ"
That... may not be entirely relevant, as C# version and .NET version is not necessarily a 1:1 match.
That said, Unity (actually Mono) definitely supports LINQ.
Still, LINQ basically just generates code and delegates it hides, while the actual implementation (IL) is still most likely simply loops (over loops). So syntactic sugar aside, the question rather is is which of the sets are larger (if you care about efficiency) and probably use that as the outer loop.
++luck;
Upvotes: 1