Unity学习路线之C#基础----基本变量
2015-10-14 14:52
483 查看
C#基本变量类型:
object System.Object 所有其它类型的基类型
string System.String Unicode字符序列
decimal System.Decimal 有28位小数的高度精度浮点数
bool System.Boolean true或false
char System.Char 16位Unicode字符
byte System.Byte 8位无符号整型
sbyte System.Sbyte 8位有符号整型
short System.Int16 16位有符号整型
int System.Int32 32位有符号整型
long System.Int64 64位有符号整型
ushort System.Uint16 16位无符号整型
uint System.Uint32 32位无符号整型
ulong System.Uint64 64位无符号整型
float System.Single 单精度浮点类型
double System.Double 双精度浮点类型
表示数字的有:byte,sbyte,short,ushort,int,uint,long,ulong,float,double,decimal.其中float,double,decimal表示小数
string 表示字符串,char表示字符,例:string="hello"; char='h', string用双引号,char用单引号
bool类型只有两个值true或者false
最常用的有:int,float,double,bool,string
object System.Object 所有其它类型的基类型
string System.String Unicode字符序列
decimal System.Decimal 有28位小数的高度精度浮点数
bool System.Boolean true或false
char System.Char 16位Unicode字符
byte System.Byte 8位无符号整型
sbyte System.Sbyte 8位有符号整型
short System.Int16 16位有符号整型
int System.Int32 32位有符号整型
long System.Int64 64位有符号整型
ushort System.Uint16 16位无符号整型
uint System.Uint32 32位无符号整型
ulong System.Uint64 64位无符号整型
float System.Single 单精度浮点类型
double System.Double 双精度浮点类型
表示数字的有:byte,sbyte,short,ushort,int,uint,long,ulong,float,double,decimal.其中float,double,decimal表示小数
string 表示字符串,char表示字符,例:string="hello"; char='h', string用双引号,char用单引号
bool类型只有两个值true或者false
最常用的有:int,float,double,bool,string
相关文章推荐
- Unity学习路线
- unity 音乐播放器的制作
- Unity更改渲染层级代码
- [Android交互]高德地图与Unity的交互
- 游戏开发设计模式之对象池模式(unity3d 示例实现)
- Shader-Vertex -像苹果关闭界面一样
- 游戏开发设计模式之对象池模式(unity3d 示例实现)
- Unity3d 异常处理- (二)
- 学习笔记——Box六面不同贴图及3dsmax导入unity
- C#快速开发3d游戏工具--Unity3d
- Vuforia Unity Camera Image Access
- Unity生命周期
- Unity3D游戏开发之Unity3D场景编辑器扩展开发
- Unity5 新功能解析--物理渲染与standard shader
- Unity3D Rigidbody详解
- Unity3D Shaderlab 学习记录
- Unity Vector3.Slerp() 球形插值详解
- Unity Vector3.Lerp()与Vecotr3.MoveTowards()方法区别
- Unity接口函数Vector3.Project()
- 【Unity】【翻译搬运】使用WheelColliders做出稳定真实的车