How can I return different lists of objects at one method? I have some methods, that returns some types of Lists, and I don't know what Parse method should return
public static [Something here (IList???)] Parse(string filePath)
{
string[] lines = File.ReadAllLines(filePath);
for (int i = 0; i < lines.Length; i++)
{
string recordId = lines[i].Substring(0, 2);
switch (recordId)
{
case "00":
return Parse00(lines[i]); //public static List<mainInfo> Parse00(string line);
case "11":
return Parse11(lines[i]); //public static List<param> Parse11(string line);
…
…
}
}
}