C# 备忘录

C# 类型

.NET Framework 类型

bool

System.Boolean

byte

System.Byte

sbyte

System.SByte

char

System.Char

decimal

System.Decimal

double

System.Double

float

System.Single

int

System.Int32

uint

System.UInt32

long

System.Int64

ulong

System.UInt64

object

System.Object

short

System.Int16

ushort

System.UInt16

string

System.String

 

 #数据类型转换

1、隐式转换  类型A到类型B(B足够容纳A)在任何情况下编译器都可顺利的完成转换,不需要任何的显式的函数。

2、显式转换  类型A范围大于类型B,但A值较小,小类型的B可以容纳。如果A值较大,超出范围,就会报错。 

 

posted on 2010-11-30 20:50  的确小凉  阅读(198)  评论(0编辑  收藏  举报