I have been researching this for a while now, and am still unsure on how to implement and what is the best way to return two lists from a separate method?
I know the
Method 1
public static void Method2(int[] array, out List list1, out List list2, int number)
{
list1= new List();
list2= new List();
...
}
Method 2
public static Tuple, List> Method2(int[] array, int number)
{
list1= new List();
list2= new List();
...
return Tuple.Create(list1, list2)
}
Method 3
Create a class that have 2 props list1, list 2, return that class, or just return array of lists
and finally on C# 7 you can just do
public static (List list1, List list2) Method2(int[] array, int number)
{
...
return (list1, list2)
}