dotnet/roslyn

Signature help for delegate types

開放

#46,190 建立於 2020年7月21日

 (42 則留言) (5 個反應) (0 位負責人)C# (4,257 個分叉)batch import
Area-IDEIDE-IntelliSensehelp wanted

倉庫指標

星標
 (20,414 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

If you're looking at this, ready to type a lambda, how do you know what to type next?

image

If it's Func<...> or Action<...> it's easy. For two or three others, I have the signature memorized and can translate the generic types in my head to the appropriate locations (e.g. Predicate<X>). For 99% of delegate types, it's a bunch of F12ing or F1ing every time.

Could signature help show something like this?

ParseArgument<SemanticVersion> is (ArgumentResult result) => SemanticVersion

@CyrusNajmabadi mentioned that something similar is already shown for anonymous types: image

🔗 Also reported at AB#1244148

貢獻者指南