GIFToWoWTexture/GIFConverter/TGASharpLib.cs
/// <summary>
/// Copies a range of elements from an Array starting at the specified source index.
/// The length and the index are specified as 32-bit integers.
/// </summary>
/// <param name="SrcArray">The <see cref="Array"/> that contains the data to copy.</param>
/// <param name="Offset">A 32-bit integer that represents the index in the
/// <see cref="SrcArray"/> at which copying begins.</param>
/// <param name="Count">A 32-bit integer that represents the number of elements to copy.</param>
/// <returns></returns>
Copies a range of elements from an Array starting at the specified source index.
The length and the index are specified as 32-bit integers.
Copies a range of elements from an Array starting at the specified source index . The length and the index are specified as 32 - bit integers .
public static T[] GetElements<T>(T[] SrcArray, int Offset, int Count)
        {
            if (SrcArray == null)
                throw new ArgumentNullException(nameof(SrcArray) + " is null!");
            if (Offset >= SrcArray.Length || Offset < 0)
                throw new ArgumentOutOfRangeException(nameof(Offset) + " has wrong value!");
            if (Count <= 0 || Offset + Count > SrcArray.Length)
                throw new ArgumentOutOfRangeException(nameof(Count) + " has wrong value!");
            T[] Buff = new T[Count];
            Array.Copy(SrcArray, Offset, Buff, 0, Buff.Length);
            return Buff;
        }
public static T [ ] GetElements < T > ( T [ ] SrcArray , int Offset , int Count ) { if ( SrcArray == null ) throw new ArgumentNullException ( nameof ( SrcArray ) + " " ) ; if ( Offset >= SrcArray . Length || Offset < 0 ) throw new ArgumentOutOfRangeException ( nameof ( Offset ) + " " ) ; if ( Count <= 0 || Offset + Count > SrcArray . Length ) throw new ArgumentOutOfRangeException ( nameof ( Count ) + " " ) ; T [ ] Buff = new T [ Count ] ; Array . Copy ( SrcArray , Offset , Buff , 0 , Buff . Length ) ; return Buff ; }
Copies a range of elements from an Array starting at the specified source index.
Copies a range of elements from an Array starting at the specified source index .
None
SrcArray
T[]
The  that contains the data to copy.
The that contains the data to copy .
Offset
int
A 32-bit integer that represents the index in the
at which copying begins.
A 32 - bit integer that represents the index in the at which copying begins .
Count
int
A 32-bit integer that represents the number of elements to copy.
A 32 - bit integer that represents the number of elements to copy .