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.
在 C# 中,在编写 lambda 表达式时,是否有 => lambda 运算符的单字符版本?
我知道输入 => 并不难,但仍然...
不可以。两个字符 ( =>) 是必需的。这就是语言的编写和设计方式。
=>
心存感激——delegate { ... } 在大多数情况下,它比旧语法要短得多。
delegate { ... }