开发者

How to automatically add argument names to a method call in C# and Visual Studio?

开发者 https://www.devze.com 2023-01-11 06:17 出处:网络
I like the named arguments feature of C# 4.0, I noticed that in some circumstances it greatly improves the readability of m开发者_StackOverflow社区y code. Is there a refactoring extension to VS, which

I like the named arguments feature of C# 4.0, I noticed that in some circumstances it greatly improves the readability of m开发者_StackOverflow社区y code. Is there a refactoring extension to VS, which would convert a normal method call to a call with explicit argument names? Like this:

Before:

cmd.Parameters.AddWithValue("Foo", "Bar");

After:

cmd.Parameters.AddWithValue(parameterName: "Foo", value: "Bar");
0

精彩评论

暂无评论...
验证码 换一张
取 消