namespace WorkList { public class Stud_Information { public List<string> students= new List<string>(); public static string Stud() { List<string> students = new List<string>(); students.Add("Mary"); } } }
namespace WorkList { class Program { static void Main(string[] args) { Stud_Information.Stud(); for (var i = 0; i < students.Count; i++) { Console.WriteLine("[" + i.ToString() + "] " + students[i] ); } Console.ReadKey(); } }
Stud()
string
return "Mary";
public static void Stud()
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)