example 1.cs
来自「北大青鸟内部资料」· CS 代码 · 共 42 行
CS
42 行
using System;
namespace Example_1
{
/// <summary>
/// 这个类演示读/写属性的用法
/// </summary>
///
public class VideoStore
{
private int vcd = 0;
public int VCD
{
get
{
return vcd;
}
set
{
vcd=value;
}
}
}
class Class1
{
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main(string[] args)
{
//
VideoStore objVideo = new VideoStore();
objVideo.VCD = 400;
Console.WriteLine("VCD 的价格 = {0}", objVideo.VCD);
//
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?