上一页 1 ··· 20 21 22 23 24 25 26 27 28 ··· 56 下一页
摘要: <?xml version="1.0" encoding="utf-8"?> <Test> <Person name="孙悟空" age="500" /> </Test> static void Main() { //Write(); //Modify(); GetVal(); Console.Re 阅读全文
posted @ 2022-11-03 22:57 double64 阅读(77) 评论(0) 推荐(0)
摘要: 测试实体: class Test { public int Age { get; set; } = 1; public string Sex { get; set; } = "男"; public Name Name { get; set; } = new Name() { Name_ = "周杰伦 阅读全文
posted @ 2022-11-03 20:45 double64 阅读(76) 评论(0) 推荐(0)
摘要: 引入命名空间: xmlns:system="clr-namespace:System;assembly=mscorlib" XAML: <Window x:Class="WpfApp.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006 阅读全文
posted @ 2022-11-02 22:09 double64 阅读(883) 评论(0) 推荐(0)
摘要: class TaskDelayTest { Stopwatch sw = new Stopwatch(); public void DoRun() { Console.WriteLine($"Caller:Before call."); ShowDelayAsync(); //ShowDelay() 阅读全文
posted @ 2022-10-21 17:41 double64 阅读(204) 评论(0) 推荐(0)
摘要: interface IMyifc<T> { T ReturnValue(T v); } class MyClass : IMyifc<int>, IMyifc<string> { public int ReturnValue(int v) { return v; } public string Re 阅读全文
posted @ 2022-10-21 10:40 double64 阅读(93) 评论(0) 推荐(0)
摘要: class IA_TEST { interface ITest { void Test(); } abstract class IATest : ITest { public abstract void Test(); } class MyTest : IATest { public overrid 阅读全文
posted @ 2022-10-21 09:53 double64 阅读(57) 评论(0) 推荐(0)
摘要: C# Async 方式 简单的流程测试: 去上班 吃早餐 上班中... 摸鱼 下班 using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Ne 阅读全文
posted @ 2022-10-21 09:45 double64 阅读(113) 评论(0) 推荐(0)
摘要: CancellationTokenSource 和 CancellationToken。 包含命名空间:using System.Threading.Tasks;。 class CancellationPractice { static void Main() { CancellationToken 阅读全文
posted @ 2022-10-19 15:18 double64 阅读(179) 评论(0) 推荐(0)
摘要: 嵌套的命名空间,低级的可以直接访问高级层次的命名空间,而相反不行。 // 低级层次的也是高级层次的一部分。 平级的不能直接访问,但 using 时可以省略共同高级部分。 嵌套命名空间:没有就创建,有就合并。 高级层次的命名空间自然是不能和低层级或同级有相同的签名声明。如,下面在 A 命名空间中定义 阅读全文
posted @ 2022-10-19 13:18 double64 阅读(218) 评论(0) 推荐(1)
摘要: 这样:ref int b = ref a; int a = 100; ref int b = ref a; b = 111; Console.WriteLine($"a = {a}, b = {b}"); Console.WriteLine("a = {0}, b = {1}", a, b); 输出 阅读全文
posted @ 2022-10-19 10:30 double64 阅读(43) 评论(0) 推荐(0)
上一页 1 ··· 20 21 22 23 24 25 26 27 28 ··· 56 下一页