⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 private.cs

📁 深入浅出C#,学习C#比较好的用例,能够很快掌握C#.
💻 CS
字号:
using System;

class Student
{
	private string name;
	private int id;
	public Student(int id,string name)
	{
		this.id=id;
		this.name=name;
	}
	public string getname()
	{
		return name;
	}
	public int getid()
	{
		return id;
	}
}

class Mainclass
{
	public static void Main()
	{
		Console.Write("Enter the id of the student:");
		string str=Console.ReadLine();
		int id=int.Parse(str);

		Console.Write("Enter the name of the student:");
		string name=Console.ReadLine();

		Student student=new Student(id,name);

		Console.WriteLine("Your input:id={0},name={1}",student.getid(),student.getname());
	}
}
		

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -