C#
m_LeonWANG
这个作者很懒,什么都没留下…
展开
-
C#:关于System.Collections空间
System.Collections命名空间包含可使用的集合类和相关的接口,提供了集合的基本功能。该命名空间下的.NET非泛型集合类如下所示:— System.Collections.ArrayList:数组集合类,使用大小可按动态增加的数组实现Ilist接口。— System.Collections.BitArray:布尔集合类,管理位值的压缩数组,该值为布尔值。—转载 2014-07-16 09:23:39 · 679 阅读 · 0 评论 -
U3D杂记:关键字解析
1.[SerializeField][SerializeField] private PolygonCollider2D[] colliders; private int currentColliderIndex = 0; [SerializeField] 关键字告诉Unity 下面的变量对Inspector暴露,允许在Unity 编辑器中访问私有成员变量原创 2014-07-29 19:48:50 · 137 阅读 · 0 评论 -
C#杂记:语法
1.A constant is static by default and we cannot use the instance reference i.e. a name to reference a const. A const has to be static as no one is allowed to make any changes to a const.原创 2014-08-26 17:29:51 · 669 阅读 · 0 评论 -
C#杂记:关键字
1.out 和refout 关键字会导致参数通过引用来传递。 这与 ref 关键字类似,不同之处在于 ref 要求变量必须在传递之前进行初始化。 若要使用 out 参数,方法定义和调用方法都必须显式使用 out 关键字。 例如:尽管作为 out 参数传递的变量不必在传递之前进行初始化,但被调用的方法需要在返回之前赋一个值。尽管 ref 和 out 关键字会导致不同的运行原创 2014-09-06 11:10:04 · 675 阅读 · 0 评论 -
C#杂记:String.Format大全
???十进制的数字??string.Format("{0:D3}",23)023格式化十进制的数字string.Format("{0:D2}",1223)1223精度说明符指示结果字符串中所需的最少数字个数12345.ToStr原创 2014-10-09 18:01:16 · 919 阅读 · 0 评论