I have a class with n data members as follows :
public class Input
{
int mode1 {get; set;}
int geom2 {get; set;}
int type3 {get; set;}
int spacing4 {get; set;}
int fluid5 {get; set;}
int spec6 {get; set;}
...
...
...
int data_n {get; set;}
}
and I have a filled list of n int items.
List<int> dataList = new List<int>
Now I want to fill an object of class Input from dataList through iteration or through any other direct method will be helpful. Thank you
var input = new Input { mode1 = dataList[i + 0], geom2 = dataList[i + 1], ..., whereistarting at 0 is the input index in the data list, enabling you to handle multiple in a loop? What have you tried?Inputclass?