+1 888 340 6572 GET STARTED
MultiCharts Project Management
Go to the previous open issue
Go to the previous issue (open or closed)
Please log in to bookmark issues
Open Feature request MC-1076

Allow "[Input]" attribute for public variables and auto-implemented properties

Go to the next issue (open or closed)
Go to the next open issue

Currently, MC .net requires you to declare input properties using this syntax:
     private int m_length = 9;
     public int length{
       get { return m_length; }
       set { m_length = value; }
This is unnecessarily verbose. It would be great if we could use either of the following forms. The first uses auto-implemented properties, with a modification to the Input attribute:
     [Input default=9]
     public int length {get; set; )
The second uses a public variable, as opposed to a property:
     public int length = 9;
I think the last version is the cleanest and easiest to read. However, if MC .Net could support these syntaxes, then people could pick whichever form they liked best. See the attached link to the discussion forum post on this issue.

Steps to reproduce this issue

See above

Comments (1)
user-offline.png  orad (orad)
Apr 27, 2017 - 07:53

In C# 6 you can do:

 public int length { get; set; } = 9;

Please vote up MC-1968 to support C# 6 compiler:

Issue basics
  • Type of issue
    Feature request
  • Category
  • Targeted for
    Not determined
  • Status
    Under Review
User pain
  • Type of bug
    Not triaged
  • Likelihood
    Not triaged
  • Effect
    Not triaged
Affected by this issue (2)
People involved
  • Posted by
    user-offline.png  Xyzzy (Xyzzy)
  • Owned by
    Not owned by anyone
  • Assigned to
    Not assigned to anyone
  • Subscribers
    2 subscriber(s)
    Click here to show the list of subscribers
Times and dates
  • Posted at
  • Last updated
Issue details
  • Resolution
    Not determined
  • Severity
Attachments (1)
Commits (0)
There are no code checkins for this issue
Duplicate issues (0)
This issue does not have any duplicates