- Timestamp:
- 02/15/10 05:26:02 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Parameters/3.3/ValueParameter.cs
r2793 r2796 47 47 } 48 48 } 49 public new T ActualValue {49 IItem IValueParameter.Value { 50 50 get { return Value; } 51 set { Value = value; } 51 set { 52 T val = value as T; 53 if (val == null) 54 throw new InvalidOperationException( 55 string.Format("Type mismatch. Value is not a \"{0}\".", 56 typeof(T).GetPrettyName()) 57 ); 58 Value = val; 59 } 52 60 } 53 61 … … 84 92 } 85 93 protected override void SetActualValue(IItem value) { 86 T val = value as T; 87 if (val == null) 88 throw new InvalidOperationException( 89 string.Format("Type mismatch. Value is not a \"{0}\".", 90 typeof(T).GetPrettyName()) 91 ); 92 Value = val; 94 ((IValueParameter)this).Value = value; 93 95 } 94 96
Note: See TracChangeset
for help on using the changeset viewer.