RequiresInRange() private method

private RequiresInRange ( int start, int length ) : void
start int
length int
return void
Esempio n. 1
0
 /// <summary>
 /// Fetches the element at the specified index.
 /// </summary>
 /// <exception cref="System.ArgumentOutOfRangeException">
 /// Thrown when the specified index is not in range (&lt;0 or &gt;&eq;length).
 /// </exception>
 public T this[int index]
 {
     get {
         Contract.RequiresInRange(index, Length);
         return(PtrUtils.Get <T>(
                    m_object, m_offset + (index * PtrUtils.SizeOf <T>())));
     }
     set {
         Contract.RequiresInRange(index, Length);
         PtrUtils.Set <T>(
             m_object, m_offset + (index * PtrUtils.SizeOf <T>()), value);
     }
 }
 /// <summary>
 /// Fetches the element at the specified index.
 /// </summary>
 /// <exception cref="System.ArgumentOutOfRangeException">
 /// Thrown when the specified index is not in range (&lt;0 or &gt;&eq;length).
 /// </exception>
 public T this[int index]
 {
     [MethodImpl(MethodImplOptions.AggressiveInlining)]
     get
     {
         Contract.RequiresInRange(index, (uint)Length);
         return(PtrUtils.Get <T>(Object, Offset, (UIntPtr)index));
     }
     [MethodImpl(MethodImplOptions.AggressiveInlining)]
     private set
     {
         Contract.RequiresInRange(index, (uint)Length);
         PtrUtils.Set(Object, Offset, (UIntPtr)index, value);
     }
 }
Esempio n. 3
0
 /// <summary>
 /// Fetches the element at the specified index.
 /// </summary>
 /// <exception cref="System.ArgumentOutOfRangeException">
 /// Thrown when the specified index is not in range (&lt;0 or &gt;&eq;length).
 /// </exception>
 public T this[int index]
 {
     [MethodImpl(MethodImplOptions.AggressiveInlining)]
     get
     {
         Contract.RequiresInRange(index, Length);
         return(PtrUtils.Get <T>(
                    _object, _offset + (index * PtrUtils.SizeOf <T>())));
     }
     [MethodImpl(MethodImplOptions.AggressiveInlining)]
     set
     {
         Contract.RequiresInRange(index, Length);
         PtrUtils.Set <T>(
             _object, _offset + (index * PtrUtils.SizeOf <T>()), value);
     }
 }