public UserControl build_editor(BaseProperty property) { Type t = property.GetType(); if (t == typeof(FloatProperty)) { FloatEditor ed = new FloatEditor(); ed.set_target((FloatProperty)property); return ed; } else { //TODO -- better message string msg = "Unknown type"; throw new Exception(msg); } }