public override string ToString() { return string.Concat("id: ", id, " s_upToHere: ", s_upToHere, " s_inSection: ", s_inSection, " velocReducer: ", velocReducer, " startCoord: ", sectionStartCoord, " endCoord: ", sectionEndCoord); }
public void Show(Section section) { var sectionType = System.Reflection.Assembly.GetExecutingAssembly().GetTypes() .Where(type => type.GetMethod(section.ToString()) != null) .First(); var sectionMethod = sectionType.GetMethod(section.ToString()); var instance = Activator.CreateInstance(sectionType); sectionMethod.Invoke(instance, null); }