Changeset 2665 for trunk/sources/HeuristicLab.Data/3.3/IntData.cs
- Timestamp:
- 01/21/10 05:10:12 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Data/3.3/IntData.cs
r2663 r2665 29 29 namespace HeuristicLab.Data { 30 30 [EmptyStorableClass] 31 [Item("Int Data", "Represents an integer value.")]31 [Item("Integer", "Represents an integer value.")] 32 32 [Creatable("Test")] 33 public sealed class IntData : ValueTypeData<int> {33 public sealed class IntData : ValueTypeData<int>, IStringConvertibleData { 34 34 public IntData() : base() { } 35 35 public IntData(int value) … … 43 43 return clone; 44 44 } 45 46 string IStringConvertibleData.GetValue() { 47 return Value.ToString(); 48 } 49 bool IStringConvertibleData.SetValue(string value) { 50 int i; 51 if (int.TryParse(value, out i)) { 52 Value = i; 53 return true; 54 } else { 55 return false; 56 } 57 } 45 58 } 46 59 }
Note: See TracChangeset
for help on using the changeset viewer.