数据类型与类型转换

值类型:

整形:有符号:int  short  long  sbyte

        无符号:uint ulong  byte

bool  :(真假值 )   ture  false 

浮点型  : decimal   double float 

枚举类型 enum

结构体类型 : struct

 引用类型 : object  (基数类型)

               string(字符串类型)

 

///////////////////////////////

类型转换 

值型间转换:(强制转换)

int i=3,s=5;

double   jieguo=(double)i/s

值型转换成字符串型

string s=i to string ()

字符串转换成值型

double d=double .parse(s) ||d=convert.todouble(s)

 

posted on 2014-12-10 11:02  极度猎隼  阅读(102)  评论(0编辑  收藏  举报