Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to setup array member as input

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to setup array member as input

    I know it's maybe generic C# question, but also falls in NT

    lets say, the defualt way to set input is:

    [GridCategory("Parameters")]
    [Gui.Design.DisplayName ("MA_2_Length")]
    public int MA_2_Length
    {
    ....

    but I am interested, is there any way to set like :

    public int[] Ma_Lengths = new int[] {14,54}

    [GridCategory("Parameters")]
    [Gui.Design.DisplayName ("MA_2_Length")]
    Ma_Lengths[2] {
    get; set;
    }


    so, directly the array member was set as an input.. I tried much, but couldnt solve this.
    Probably you (or Jesse) could help?

    thanks in advance.

    #2
    Hello TazoTodua,

    Thanks for your inquiry.

    It's possible to use an int array as an input parameter. If you are trying to set one member of the array, you could make an input of type int and then use the getter and setter to assign the value to the member of the array.

    I've attached an example demonstrating.

    Please let us know if this does not resolve your inquiry.
    Attached Files

    Comment


      #3
      thanks.
      I was trying just to avoid setter/getter and directly set them. however ok, thanks!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      601 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      347 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      103 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      559 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      558 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X