+1 888 340 6572
MultiCharts Project Management
previous_open_issue.png
Go to the previous open issue
previous_issue.png
Go to the previous issue (open or closed)
star_faded.png
Please log in to bookmark issues
feature_request_small.png
Open Feature request MC-1076

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

action_vote_minus_faded.png
5
Votes
action_vote_plus_faded.png
next_issue.png
Go to the next issue (open or closed)
next_open_issue.png
Go to the next open issue
Description

Currently, MC .net requires you to declare input properties using this syntax:
     private int m_length = 9;
     [Input]
     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:
     [Input]
     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)
#1
user-offline.png  orad (orad)
Apr 27, 2017 - 07:53

In C# 6 you can do:

 [Input]
 public int length { get; set; } = 9;

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

History
Issue basics
  • Type of issue
    Feature request
  • Category
    Usability
  • 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
    Normal
Attachments (1)
Commits (0)
There are no code checkins for this issue
Duplicate issues (0)
This issue does not have any duplicates