随笔分类 - C#
摘要:1、获取父路径 result = System.IO.Directory.GetParent(result).ToString(); 2、截取 \\E:\\BTSData\\2019-11 => 2019-11 result = result.Substring(result.LastIndexOf
阅读全文
摘要:https://blog.csdn.net/letianok/article/details/7257117 1、GetType()方法继承自Object,所以C#中任何对象都具有GetType()方法,x.GetType(),其中x为变量名; 2、typeof(x)中的x,必须是具体的类名、类型名
阅读全文
摘要:https://www.cnblogs.com/woaixiaozhi/p/5116137.html 值类型: (1)其实例都分配在线程栈中,不受垃圾回收的控制; (2)内置值类型、枚举Enum类型、struct 引用类型: (1)其实例都分配在托管堆上; (2)数组、object、字符串、类、指针
阅读全文
摘要:https://blog.csdn.net/weizhiai12/article/details/7107713 https://blog.csdn.net/ABC13222880223/article/details/89916624 https://www.cnblogs.com/benwu/p
阅读全文
摘要:1、Demo1 https://blog.csdn.net/baidu_39486224/article/details/79980758 // 文件创建、移动、删除、生成、压缩 private void button5_Click(object sender, EventArgs e) { str
阅读全文
摘要:int num; num = Convert.ToInt32(Console.ReadLine());\\函数 Convert.ToInt32() 把用户输入的数据转换为 int 数据类型,因为 Console.ReadLine() 只接受字符串格式的数据。
阅读全文