Questions tagged «null-coalescing»


3
是什么 ?[]?C#中的语法?
虽然我正在研究委托其是实际上是一个抽象类中Delegate.cs,我看到了下面的方法中,我不明白 为什么返回值?已经使用了reference(class)类型,为什么要使用 ?[]? 参数含义 你能解释一下吗? public static Delegate? Combine(params Delegate?[]? delegates) { if (delegates == null || delegates.Length == 0) return null; Delegate? d = delegates[0]; for (int i = 1; i < delegates.Length; i++) d = Combine(d, delegates[i]); return d; }
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.