WriteLine with a class
<p>I'm making a SchoolApp program to learn about C# and I have this main function that I'm trying to make work:</p>

<pre><code>namespace SchoolApp
{
    class Program
    {
        public static void Main(string[] args)
        {
            School sch = new School("Local School");
            sch.AddStudent(new Student { Name = "James", Age = 22 }); // this function
            sch.AddStudent(new Student { Name = "Jane", Age = 23 });
            Console.WriteLine(sch); // this implementation
        }
    }
}
</code></pre>

<p>School class:</p>

<pre><code>namespace SchoolApp
{
    class School
    {
        public string name;

        public School()
        {
        }

        public School(string the_name)
        {
            name = the_name;
        }

        public void AddStudent(Student student)
        {

        }
    }
}
</code></pre>

<p>Student class:
namespace SchoolApp</p>

<pre><code>{
    class Student
    {
        public int Age;
        public string Name;
        public Student()
        {
            Age = 0;
            Name = "NONAME";
        }

        public string _name 
        {
            get
            {
                return this.Name;
            }
            set
            {
                Name = value;
            }
        }
        public int _age
        {
            get
            {
                return this.Age;
            }
            set
            {
                Age = value;
            }
        }

    }
}
</code></pre>

<p>I'm new to C# and I am pretty lost as to how I should make the AddStudent and how to work with the WriteLine to write the class. The output should be along these lines:</p>

<p>School: Local School
James, 22
Jane, 23</p>

<p>Someone suggested using List&lt;> I hit the same problem of not knowing enough about it.</p>

<p>EDIT: Thank you all for your extremely fast answers. I got it working and will now commense reading the answers in depth so I don't have to ask related questions again!</p>
