![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C#
高大王
一阵凉意袭来,说明又该过年
展开
-
C# ConfigureAwait(false) 作用 UI程序中避免了死锁
C# ConfigureAwait(false) 作用 UI程序中避免了死锁原创 2022-08-25 16:32:42 · 1625 阅读 · 0 评论 -
C# 协变与逆变
“协变”->”和谐的变”->”很自然的变化”->string->object :协变。 “逆变”->”逆常的变”->”不正常的变化”->object->string 逆变。 协变 接口 /// <summary> /// 逆变 /// </summary> /// <typeparam name="T"></typeparam> public interface IDisplay&原创 2021-10-15 17:05:34 · 86 阅读 · 0 评论 -
按值和按引用传递参数
假设有一个类型A,它有一个Int类型的属性X. ChangA方法是接收A的参数,把X的值改为2 public class A { public int X { get; set; } } class Program { public static void ChangeA(A a) { a.X = 2; } static void Main() { A a1 = new A { X = 1 }; ChangeA(a1原创 2021-10-08 12:22:33 · 119 阅读 · 0 评论