#32 Can Set Initial Values for Fields In Structs

Core (12)
Phil Munie

It is possible to set initial values for fields in structs. This becomes a problem when you go to generate to C# code because it's a compiler error if you have instance field initializers.

For example:
public struct MyStruct
int myValue = 0; // Compiler error

Notes: Using NClass v2.01 in Windows.


  • Balazs Tihanyi

    Balazs Tihanyi - 2009-08-21

    Thanks for pointing out this issue, I'll fix it later.

    Unfortunatey, there are still a lots of ways to create diagrams with incorrect semantics. I plan to change this and implement all kind of validation rules in the next major release.

  • Balazs Tihanyi

    Balazs Tihanyi - 2009-08-21
    • labels: 998057 --> Core
    • status: open --> open-later

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks