public static List <T> Set <T>() where T : class { if (typeof(T) == typeof(Building)) { return((List <T>)Buildings.Cast <T>()); } if (typeof(T) == typeof(Room)) { return((List <T>)Rooms.Cast <T>()); } if (typeof(T) == typeof(Router)) { return((List <T>)Routers.Cast <T>()); } if (typeof(T) == typeof(Computer)) { return((List <T>)Computers.Cast <T>()); } return(null); }