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 Hwop38, 05-04-2026, 07:02 PM
      0 responses
      161 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Started by CaptainJack, 04-24-2026, 11:07 PM
      0 responses
      309 views
      0 likes
      Last Post CaptainJack  
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      245 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      349 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      179 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Working...
      X