How to get the individual value of a public static list
//get value error
Console.WriteLine(lbl_test.module_a.moduleoutput[0]);
public static List<string> moduleoutput()
{
List<string> output = new List<string>();
output.Add("test 1");
output.Add("test 2");
output.Add("test 3");
return output;
}
Error:
Cannot apply indexing with [] to an expression of type ‘method group’
You need to get the list first before you can access it by the indexer. So the method call is missing(the parentheses).
moduleoutputis a method not a variable.Search for Method Access here: http://msdn.microsoft.com/en-us/library/ms173114.aspx