C# 6.0 新特性
2021-04-20 14:30
标签:分享图片 soscw com name ring gpo ram alt student C# 6.0 新特性 标签:分享图片 soscw com name ring gpo ram alt student 原文地址:https://www.cnblogs.com/lgxlsm/p/8618658.htmlnameof
class Program
{
static void Main(string[] args)
{
Console.WriteLine(nameof(Student));
Console.WriteLine(nameof(Student.A));
Console.WriteLine(nameof(Student.B));
Console.WriteLine(nameof(Student.C));
Console.Read();
}
public class Student
{
public string A => "";
public int B => 0;
public DateTime C => DateTime.MinValue;
}
}