public void AddTimeEvent(string type, Prop prop) { TimeEvent time_event = System.Reflection.Assembly.GetExecutingAssembly().CreateInstance("TimeEvent" + type) as TimeEvent; time_event.Create(prop, timeLine); AddTimeEvent(time_event); }