44
55namespace StructLinq . IList
66{
7- public struct IListEnumerable < T > : IStructCollection < T , IListEnumerator < T > >
7+ public struct IListEnumerable < T , TList > : IStructCollection < T , IListEnumerator < T , TList > >
8+ where TList : IList < T >
89 {
910 #region private fields
10- private readonly IList < T > list ;
11+ private readonly TList list ;
1112 private int length ;
1213 private int start ;
1314 #endregion
14- public IListEnumerable ( IList < T > list , int start , int length )
15+ public IListEnumerable ( TList list , int start , int length )
1516 {
1617 this . list = list ;
1718 this . length = length ;
1819 this . start = start ;
1920 }
2021
2122 [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
22- public readonly IListEnumerator < T > GetEnumerator ( )
23+ public readonly IListEnumerator < T , TList > GetEnumerator ( )
2324 {
24- return new IListEnumerator < T > ( list , start , Count ) ;
25+ return new IListEnumerator < T , TList > ( list , start , Count ) ;
2526 }
2627 public readonly int Count
2728 {
@@ -42,7 +43,7 @@ public void Slice(uint start, uint? length)
4243 [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
4344 public object Clone ( )
4445 {
45- return new IListEnumerable < T > ( list , start , length ) ;
46+ return new IListEnumerable < T , TList > ( list , start , length ) ;
4647 }
4748
4849 [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
0 commit comments