Пример #1
0
 /// <summary>Gets the value at the given index.</summary>
 protected override object Get(int index)
 {
     if (rawBuffer == null)
     {
         // Use the _Buffer instead:
         return(LittleConverter.ToUInt16(_Buffer.buffer, (index * 2) + ByteOffset));
     }
     return(rawBuffer[index]);
 }
Пример #2
0
 /// <summary>
 /// Gets or sets the given entry in the array.
 /// </summary>
 public ushort this[int index] {
     get{
         if (rawBuffer == null)
         {
             // Use the _Buffer instead:
             return(LittleConverter.ToUInt16(_Buffer.buffer, (index * 2) + ByteOffset));
         }
         return(rawBuffer[index]);
     }
     set{
         if (rawBuffer == null)
         {
             // Use the _Buffer instead:
             LittleConverter.GetBytes(value, _Buffer.buffer, (index * 2) + ByteOffset);
             return;
         }
         rawBuffer[index] = value;
     }
 }