开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜