I have one ArrayList in Session, lets say for example [305,306,380].
On submit, user choice other products which i save them in 2nd array, for example [390,305,480,380]
How can i make another three arrays where
-
All new values
[390,480] -
All values which are in both lists
[305,380] -
All values from list1 which are not in list2
[306]
I need this in ASP.NET 4.0 C#
You can use
ArrayList.ToArray()to get arrays against your arraylists. Then using LINQ you can easily get what you want withExceptanIntersectmethods, for exampleEdit: Complete Code
According to your requirement, your code may look-like this;