上一页 1 2 3 4 5 6 7 8 9 10 ··· 20 下一页
摘要: 1.fixed语句 *固定用于指针操作的变量; *可防止垃圾回收器重新定位可移动变量,并声明指向该变量的指针; *固定变量的地址,在语句的持续时间内不会更改 *fixed语句中,只能使用声明的指针,声明的指针是只读的,无法修改 *fixed语句只能在不安全的上下文中使用 static void Ma 阅读全文
posted @ 2024-09-19 11:16 echo-efun 阅读(1066) 评论(0) 推荐(0)
摘要: xml位于命名空间中时查找 static void Main(string[] args) { XElement root = XElement.Parse(@"<aw:Root xmlns:aw='http://www.efun.com'> <aw:Child1> <aw:GrandChild1> 阅读全文
posted @ 2024-09-18 17:19 echo-efun 阅读(136) 评论(0) 推荐(0)
摘要: static void Main(string[] args) { XElement purchaseOrder = XElement.Load("Contacts.xml"); string partNos = (string)(from item in purchaseOrder.Descend 阅读全文
posted @ 2024-09-18 17:09 echo-efun 阅读(53) 评论(0) 推荐(0)
摘要: using System.Xml.Linq; static void Main(string[] args) { XElement contacts = new XElement("Contacts", new XElement("Contact", new XElement("Name", "Pa 阅读全文
posted @ 2024-09-18 16:10 echo-efun 阅读(33) 评论(0) 推荐(0)
摘要: 网卡部分高级设置 1.节能以太网 Energy Efficient Ethernet 2.自动关闭Gigabit Automatically Close Gigabit 3.电量低时降低网络速度 Reduce Speed On Power Down 4.流控制 Flow Control 5.千兆主从 阅读全文
posted @ 2024-09-18 15:38 echo-efun 阅读(1144) 评论(0) 推荐(0)
摘要: 1.查询一定范围数字 static void QueryInt() { // Specify the data source. int[] scores = { 97, 92, 81, 60 }; // Define the query expression. IEnumerable<int> sc 阅读全文
posted @ 2024-09-18 13:55 echo-efun 阅读(42) 评论(0) 推荐(0)
摘要: Invoke是同步更新,会阻塞所在工作者线程,而BeginInvoke是异步更新,不会阻塞当前线程 阅读全文
posted @ 2024-08-26 13:38 echo-efun 阅读(33) 评论(0) 推荐(0)
摘要: public static void Main() { List<int>? numbers = null; int? a = null; Console.WriteLine((numbers is null)); //true // 如果numbers为空,则初始化numbers,同时添加一个5到 阅读全文
posted @ 2024-08-23 16:33 echo-efun 阅读(43) 评论(0) 推荐(0)
摘要: public static async Task Main() { Task<int> downloading = TaskAsync(); Console.WriteLine($"{nameof(Main)}: A"); int bytesLoaded = await downloading; C 阅读全文
posted @ 2024-08-23 16:06 echo-efun 阅读(31) 评论(0) 推荐(0)
摘要: 非引用类型初始化为空,类型后面加? int? value = null; //在不想指定value一个初始值情况下,指定value为空 阅读全文
posted @ 2024-08-22 10:50 echo-efun 阅读(27) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 9 10 ··· 20 下一页