Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我今天遇到了这段代码
AsyncInvoke(OnTimeMessageTimer, (object)null, (ElapsedEventArgs)null);
有什么问题吗?
有时,当方法重载时,您需要这样做......告诉编译器您正在调用哪个。一个 null 对象仍然是 null 并且它是安全的。
它可能需要强制转换来解决重载