Changeset 2467 for trunk/sources/HeuristicLab.MainForm
- Timestamp:
- 11/05/09 13:18:44 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.MainForm/3.2/MainFormManager.cs
r2466 r2467 113 113 return (IView)Activator.CreateInstance(t, objectToView); 114 114 } 115 116 public static IView CreateView(Type viewType) { 117 if (!typeof(IView).IsAssignableFrom(viewType)) 118 throw new ArgumentException("View can not be created becaues given type " + viewType.ToString() + " is not of type IView."); 119 return (IView)Activator.CreateInstance(viewType); 120 } 121 122 public static IView CreateView(Type viewType, object objectToView) { 123 if (!typeof(IView).IsAssignableFrom(viewType)) 124 throw new ArgumentException("View can not be created becaues given type " + viewType.ToString() + " is not of type IView."); 125 return (IView)Activator.CreateInstance(viewType,objectToView); 126 } 115 127 } 116 128 }
Note: See TracChangeset
for help on using the changeset viewer.