Resolver is skipping default constructors in structs

SyntaxEditor .NET Languages Add-on for Windows Forms Forum

Posted 14 years ago by Iurii Gazin
Version: 4.0.0284
Platform: .NET 3.5
Environment: Windows 7 (64-bit)
Avatar
Hi,
DotNetProjectResolver is skipping default constructor is structs (if there are no constructors, defined by developer) when syntaxEditor is collecting data threw AddExternalReference.
I assume, that such structs don`t have constructors threw reflection, and syntaxEditor just skipping them. In case if I write down struct without constructors in syntaxEditor, it shows them.
So, if I type "new SomeStruct" - after keyword new, it shows nothing, if SomeStruct isn`t having ctors and it is added by AddExternalReference

In special cases we should use new keyword and parameterless ctors. For example if I use:

struct Person
{
    public int Age { get; set; }
    public string Name { get; set; }
}
I can`t write:

Person person;
person.Age = 5;
Don`t know why, but VS requires
 Person person = new Person(); 
If there are auto-properties in structure.

I`m attaching screenshot and demo-project

Comments (2)

Posted 14 years ago by Iurii Gazin
Avatar
How can I attach screens and data normally? )

Screen
Demo project
Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
HI Iurii,

Thanks for the sample, we've fixed it for the next maintenance release.

You can email our support address with samples and screens in the future.


Actipro Software Support

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

Add Comment

Please log in to a validated account to post comments.