Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class ModelResult
- {
- public string NAME { get; set; }
- public List<DataPointVM> RESULTs { get; set; }
- }
- public class DataPointVM
- {
- private float v1;
- private float v2;
- public DataPointVM(float v1, float v2)
- {
- this.TIME = v1;
- this.VALUE = v2;
- }
- public float TIME { get; set; }
- public float VALUE { get; set; }
- }
- public class SimulationResult
- {
- public List<ViewModels.ModelResult> mresult { get; set; }
- public SimulationResult()
- {
- mresult = new List<ViewModels.ModelResult>(); //create the list
- }
- }
- List<string> parameterList = new List<string>(new string[] {
- "First",
- "Second",
- "Third"
- });
- int index = 0;
- SimulationResult newList = new SimulationResult(); // Final result should store here
- for (index=0;index<parameterList.Count();index++)
- {
- ModelResult mdlres = new ModelResult(); // store temporary list
- List<DataPointVM> points = new List<DataPointVM>(); store details
- mdlres.NAME = parameterList[index];
- for (int i = 0; i < 100; i++)
- {
- points.Add(new ViewModels.DataPointVM(TIME<int>, VALUE<float>));
- }
- mdlres.RESULTs = points.ToList(); // store key with details
- newList.mresult.Add(mdlres); create collection of mdlres
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement