摘要:
Task 从线程池中获得一个新线程 阅读全文
摘要:
C#官方源码参考 https://referencesource.microsoft.com/ C#官方源码参考 https://github.com/Unity-Technologies/UnityCsReference unity源码 阅读全文
摘要:
序列化和反序列化代码如下 /// <summary> /// 将一个object对象序列化,返回一个byte[] /// </summary> public static byte[] ObjectToBytes(object obj) { using (MemoryStream ms = new 阅读全文
摘要:
class Program { delegate void MyDelegate(string str); static void Main(string[] args) { //正常调用 MyDelegate myDelegate = new MyDelegate(CW); myDelegate( 阅读全文
摘要:
使用泛型可以定义接口,在接口中定义的方法可以带泛型参数。 《C#高级编程(第7版)》清华大学出版社 namespace Test { class Program { static void Main(string[] args) { TestClass testClass = new TestCla 阅读全文
摘要:
1. where T : struct 对于结构约束,类型T必须是值类型 2. where T : class 对于类约束,类型T必须是引用类型 3. where T : 接口名称IFoo 对于指定接口IFoo约束,类型T必须实现指定接口IFoo 4. where T : 类名Foo 对于指定类Fo 阅读全文
摘要:
Linux 命令 ls 查看当前文件夹下所有文件 Linux 命令 Tab 自动补全命令 阅读全文
摘要:
C#对文件夹操作类 Directory C#判断字符串是否是以一定格式结尾 获取该文件夹下的所有文件和文件夹 获取当前unity的编译环境 EditorUserBuildSettings.activeBuildTarget 对应枚举 BuildTarget 阅读全文