Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/04/13 14:03:58 (11 years ago)
Author:
mkommend
Message:

#2075: Removed default element names for ValueTypeArrays and added more efficient implementation for the row header update in the view.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Data/3.3/ValueTypeArray.cs

    r9692 r9695  
    5151        if (value == null || !value.Any())
    5252          elementNames = new List<string>();
    53         else if (value.Count() != Length)
    54           throw new ArgumentException("An element name must be specified for each element.");
     53        else if (value.Count() > Length)
     54          throw new ArgumentException("The number of element names must not exceed the array length.");
    5555        else
    5656          elementNames = new List<string>(value);
     
    6969          while (elementNames.Count > value)
    7070            elementNames.RemoveAt(elementNames.Count - 1);
    71           if (elementNames.Any()) {
    72             while (elementNames.Count < value)
    73               elementNames.Add("Element " + elementNames.Count);
    74           }
    7571          OnElementNamesChanged();
    7672          OnReset();
Note: See TracChangeset for help on using the changeset viewer.