using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ReadOnlyTest
{
// 定义 point 结构
public struct point
{
public int x;
public int y;
// 定义 point 结构 的 构造函数
public point(int x, int y)
{
this.x = x;
this.y = y;
}
}
class Program
{
// 定义 动态常量
private static readonly double pi = 3.14159265;
// 使用 构造函数 定义 动态常量
public static readonly point P=new point(12, 26);
static void Main(string[] args)
{
// 输出 对比 结果
Console.WriteLine("pi={0}", pi);
Console.WriteLine("P.x={0}", P.x);
Console.WriteLine("P.y={0}", P.y);
Console.ReadKey();
}
}
}
[url=http://s.click.alimama.com/a/qvYjdTCFlgg=-13358728]诚品服饰 英伦男装 无条件退换[/url]
2052

被折叠的 条评论
为什么被折叠?



