Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/19/11 17:47:26 (13 years ago)
Author:
abeham
Message:

#1465

  • updated from trunk
  • fixed the bug regarding the -1 x-axis start
Location:
branches/histogram
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/histogram

  • branches/histogram/HeuristicLab.Parameters/3.3/ValueParameter.cs

    r5843 r6032  
    5454    public ValueParameter(string name, string description, T value) : base(name, description, value) { }
    5555    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;
    5662
    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]);
    6264    }
    6365
Note: See TracChangeset for help on using the changeset viewer.