正在加载图片...
其它运算符-sizeof sizeof用于获取值类型的字节大小,仅适用于值类型,而 不适用于引用类型 The size of short is 2 The size of int is 4. ■ 返回int类型结果,单位是字节 The size of long is 8. 参数为己定义类型时,可以在托管请按任意健继续。: static void Main(string[]args) Console.WriteLine("The size of short is {0}.",sizeof(short)); Console.WriteLine("The size of int is [0}.",sizeof(int)); Console.WriteLine("The size of long is [0}.",sizeof(long)); 例:3-6 sizeof 17 其它运算符 - sizeof ▪ sizeof用于获取值类型的字节大小,仅适用于值类型,而 不适用于引用类型 ▪ 返回int类型结果,单位是字节 ▪ 参数为已定义类型时,可以在托管代码中运行 例:3-6 sizeof
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有