Can we show default parameters in member parameter info similar to Visual Studio does it?

SyntaxEditor .NET Languages Add-on for Windows Forms Forum

Posted 4 years ago by Marc Beeson - Precision Mining
Version: 20.1.0400
Avatar

If we have a method declared as

public static void DoSomething(string what, int howMany = 3)

In the current version of the SyntaxEditor the ParameterInfo control will show

void ClassName.DoSomething(string what, [int howMany])

In Visual Studio the ParameterInfo shows

(string what, int howMany = 3)

It makes it easier to know what the default value is. Ideally it would be a small tweak to end up looking like this

void ClassName.DoSomething(string what, int howMany = 3)

[Modified 4 years ago]

Comments (2)

Posted 4 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Marc,

I'm sorry but that option isn't available at this time.  The reflection data we store for parameters isn't tracking what the default value is.  It only knows if the parameter is optional or not.  I'm not sure we could even get the default value expression from a .NET assembly's reflection.

We'll write down this request though.


Actipro Software Support

Posted 4 years ago by Marc Beeson - Precision Mining
Avatar

Thanks for the quick response

The latest build of this product (v24.1.0) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.