- Timestamp:
- 04/19/11 17:47:26 (13 years ago)
- Location:
- branches/histogram
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/histogram
- Property svn:mergeinfo changed
/trunk/sources merged: 6025
- Property svn:mergeinfo changed
-
branches/histogram/HeuristicLab.Parameters/3.3/ValueParameter.cs
r5843 r6032 54 54 public ValueParameter(string name, string description, T value) : base(name, description, value) { } 55 55 public ValueParameter(string name, string description, T value, bool getsCollected) : base(name, description, value, getsCollected) { } 56 57 protected T CreateDefaultValue() { 58 Type type = typeof(T); 59 if (type.IsAbstract) return null; 60 ConstructorInfo defaultConstructor = type.GetConstructor(Type.EmptyTypes); 61 if (defaultConstructor == null) return null; 56 62 57 protected T CreateDefaultValue() { 58 ConstructorInfo defaultConstructor = typeof(T).GetConstructor(Type.EmptyTypes); 59 if (defaultConstructor != null) 60 return (T)defaultConstructor.Invoke(new object[0]); 61 return null; 63 return (T)defaultConstructor.Invoke(new object[0]); 62 64 } 63 65
Note: See TracChangeset
for help on using the changeset viewer.