SoFunction
Updated on 2025-04-11

.net get set usage summary page 3/3


using System;
using ;
using ;

Usage of namespace attribute
{
    public class Student
    {
private string stuCollege = "jyu";//The school name cannot be modified
private string stuName = "A Huinan";
        private int stuAge = 22;
        public string studentName
        {
            get { return stuName; }
            set { stuName = value; }
        }
        public int studentAge
        {
            get { return stuAge; }
            set { stuAge = value; }
        }
        public string studentCollege
        {
            get { return stuCollege; }
        }
        public string studentInfo
        {
get { return "School: " + stuCollege + "Name: " + stuName + "Age: " + stuAge;}
        }
    }
    class Program
    {
        static void Main(string[] args)
        {
            Student stu = new Student();
            ( + "\n");
             = 25;
            ();
            ();
        }
    }
}