Free cookie consent management tool by TermsFeed Policy Generator

Changeset 3254


Ignore:
Timestamp:
04/01/10 21:08:50 (14 years ago)
Author:
gkronber
Message:

Changed StringArray to implement IEnumerable<string> instead of IEnumerable. #957 (StringArray should implement IEnumerable<string>)

File:
1 edited

Legend:

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

    r3160 r3254  
    2121
    2222using System;
     23using System.Linq;
    2324using System.Collections;
    2425using System.Text;
     
    2627using HeuristicLab.Core;
    2728using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     29using System.Collections.Generic;
    2830
    2931namespace HeuristicLab.Data {
    3032  [Item("StringArray", "Represents an array of strings.")]
    3133  [StorableClass]
    32   public class StringArray : Item, IEnumerable, IStringConvertibleArray {
     34  public class StringArray : Item, IEnumerable<string>, IStringConvertibleArray {
    3335    [Storable]
    3436    protected string[] array;
     
    8991    }
    9092
    91     public virtual IEnumerator GetEnumerator() {
    92       return array.GetEnumerator();
     93    public IEnumerator<string> GetEnumerator() {
     94      return (IEnumerator<string>)array.GetEnumerator();
     95    }
     96
     97    IEnumerator IEnumerable.GetEnumerator() {
     98      return ((IEnumerable<string>)this).GetEnumerator();
    9399    }
    94100
Note: See TracChangeset for help on using the changeset viewer.