结构体

1、

struct route
{
public orientation direction;
public double distance;
}

 2、带函数的结构体

struct CustomerName
{
  public string firstName,lastName;
  public string Name()
  {
      return firstName+" "+lastName;
  }
}

注意:声明在主体代码的外面

原文地址:https://www.cnblogs.com/judes/p/9042471.html