public static Workout CreateFrom(D1008_Workout_Type workout_struct) { byte[] name_bytes = new byte[] { workout_struct.name01, workout_struct.name02, workout_struct.name03, workout_struct.name04, workout_struct.name05, workout_struct.name06, workout_struct.name07, workout_struct.name08, workout_struct.name09, workout_struct.name10, workout_struct.name11, workout_struct.name12, workout_struct.name13, workout_struct.name14, workout_struct.name15, workout_struct.name16 }; string name = BitConverter.ToString(name_bytes); Steps[] steps = new Steps[] { workout_struct.step01, workout_struct.step02, workout_struct.step03, workout_struct.step04, workout_struct.step05, workout_struct.step06, workout_struct.step07, workout_struct.step08, workout_struct.step09, workout_struct.step10, workout_struct.step11, workout_struct.step12, workout_struct.step13, workout_struct.step14, workout_struct.step15, workout_struct.step16, workout_struct.step17, workout_struct.step18, workout_struct.step19, workout_struct.step20 }; return(new Workout(name, (SportType)workout_struct.sport_type, steps)); }
public static Workout CreateFrom(D1008_Workout_Type workout_struct) { byte[] name_bytes = new byte[] { workout_struct.name01, workout_struct.name02, workout_struct.name03, workout_struct.name04, workout_struct.name05, workout_struct.name06, workout_struct.name07, workout_struct.name08, workout_struct.name09, workout_struct.name10, workout_struct.name11, workout_struct.name12, workout_struct.name13, workout_struct.name14, workout_struct.name15, workout_struct.name16 }; string name = BitConverter.ToString(name_bytes); Steps[] steps = new Steps[] { workout_struct.step01, workout_struct.step02, workout_struct.step03, workout_struct.step04, workout_struct.step05, workout_struct.step06, workout_struct.step07, workout_struct.step08, workout_struct.step09, workout_struct.step10, workout_struct.step11, workout_struct.step12, workout_struct.step13, workout_struct.step14, workout_struct.step15, workout_struct.step16, workout_struct.step17, workout_struct.step18, workout_struct.step19, workout_struct.step20}; return new Workout(name, (SportType) workout_struct.sport_type, steps); }