Does Intellisense support 'dynamic' keyword?

SyntaxEditor .NET Languages Add-on for WPF Forum

Posted 1 year ago by Christel
Version: 17.1.0652
Avatar

Hi,

 

I have a class with following method:

public dynamic Lookup(string name, params string[] values);

When using the method in Syntaxeditor, Intellisense shows as return value 'object' instead of 'dynamic'.

In which product version will this keyword 'dynamic' ( C# 4.0) be supported with Intellisense?

Thanks for infos!

 

Christel

Comments (3)

Posted 1 year ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Christel,

I don't believe we have any special IntelliPrompt handling for the dynamic keyword at this time and our parser will treat it like an Object.  Looking back at notes, the main problem is that there are a number of places in the parser where type keywords are translated to qualified names.  For instance, "int" translates to a qualified name of "System.Int32".  I don't believe there is any dedicated .NET type that represents the "dynamic" keyword, which is why our qualified name translation code coerces it to "System.Object".  

Are you basically just looking for the word "dynamic" to show up in the quick info instead of "object"?

Taking another look at the .NET framework, I see System.Dynamic.ExpandoObject.  Do you think that would be a valid translation target for the "dynamic" keyword?


Actipro Software Support

Posted 1 year ago by Christel
Avatar

As far as I understand this new  "Dynamic" World in C# 4.0, the keyword "dynamic" is not necessarily only a target for System.Dynamic.ExpandoObject.

Yes, to enable late binding for an instance of the ExpandoObject class, you must use the dynamic keyword.

But 'dynamic' could as well be a target for the DynamicObject class and for some different behaviour.

In our application, the dynamic return value is used to validate the return value during run time and not during compile time.The role of the compiler in these examples is to package together information about what each statement is proposing to do to the object or expression that is typed as dynamic. At run time, the stored information is examined, and any statement that is not valid causes a run-time exception.

Posted 1 year ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Christel,

I believe we were able to make some changes today that should help with this.  If you'd like to try a preview build with the updates, please write our support address and mention this thread.  Thanks!


Actipro Software Support

The latest build of this product (v2019.1 build 0681) was released 18 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.