C# 提供称为简单类型的预定义结构类型集。简单类型通过保留字标识,而这些保留字只是 System 命名空间中预定义结构类型的别名,详见下表。保留字 化名的类型
sbyte
System.SByte
byte
System.Byte
short
System.Int16
ushort
System.UInt16
int
System.Int32
uint
System.UInt32
long
System.Int64
ulong
System.UInt64
char
System.Char
float
System.Single
double
System.Double
bool
System.Boolean
decimal
System.Decimal
由于简单类型是结构类型的别名,每个简单类型都具有成员。例如,int 具有在 System.Int32 中声明的成员以及从 System.Object 继承的成员,允许使用下面的语句:int i = int.MaxValue; // System.Int32.MaxValue constant
string s = i.ToString(); // System.Int32.ToString() instance method
string t = 123.ToString(); // System.Int32.ToString() instance method
sbyte
System.SByte
byte
System.Byte
short
System.Int16
ushort
System.UInt16
int
System.Int32
uint
System.UInt32
long
System.Int64
ulong
System.UInt64
char
System.Char
float
System.Single
double
System.Double
bool
System.Boolean
decimal
System.Decimal
由于简单类型是结构类型的别名,每个简单类型都具有成员。例如,int 具有在 System.Int32 中声明的成员以及从 System.Object 继承的成员,允许使用下面的语句:int i = int.MaxValue; // System.Int32.MaxValue constant
string s = i.ToString(); // System.Int32.ToString() instance method
string t = 123.ToString(); // System.Int32.ToString() instance method
解决方案 »
- 关于asp服务器控件转最终转化为HTML标签的规律,求帮忙归纳。
- [C#]视频监控、视频显示在panel上、后台怎么去写入呢?
- 请给出这两个c#操作的代码
- 求C#代码:根据日期 计算出本周的第一天和最后一天的日期。
- 谁来帮我解释一下,什么是SOA?什么是AJAX?什么是敏捷开发,什么是XP开发?
- 关于winform两个窗体显示数据的问题
- 如何打印datagrid
- C#应用程序打包
- DevExpress13.2支持ClickOnce发布吗
- 安装程序的快捷方式怎样指向一个文件(VS.net的打包工具)?
- PerformanceCounterCategory.GetCategories(strMachineName) Access Denied
- C# 和 VC 中的Char 型态不同.之中要如何转换阿 ????急急急~~~~~~~~
ms-help://MS.NETFrameworkSDK.CHS/cpguidenf/html/cpconplatforminvokedatatypes.htm
比如说DWORD在32位Windows上是32为整数,那么在C#里面用int、uint都可以。char是8位的,对应于C#的byte....