Mosa.ClassLib.BinaryFormat.GetUShort C# (CSharp) Метод

GetUShort() публичный Метод

Gets the unsigned short.
public GetUShort ( uint offset ) : ushort
offset uint The offset.
Результат ushort
        public ushort GetUShort(uint offset)
        {
            return (ushort)(data[offset++] | (data[offset++] << 8));
        }

Usage Example

Пример #1
0
        /// <summary>
        /// Gets the cluster entry.
        /// </summary>
        /// <param name="data">The data.</param>
        /// <param name="index">The index.</param>
        /// <param name="type">The type.</param>
        /// <returns></returns>
        public static uint GetClusterEntry(byte[] data, uint index, FatType type)
        {
            BinaryFormat entry = new BinaryFormat(data);

            uint cluster = entry.GetUShort(Entry.FirstCluster + (index * Entry.EntrySize));

            if (type == FatType.FAT32)
                cluster |= ((uint)entry.GetUShort(Entry.EAIndex + (index * Entry.EntrySize))) << 16;

            return cluster;
        }
All Usage Examples Of Mosa.ClassLib.BinaryFormat::GetUShort