Class ByteExtensions
Adds useful methods to the byte and byte[] data types
Inheritance
System.Object
ByteExtensions
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace:EvilDICOM.Core.Extensions
Assembly:EvilDICOM.dll
Syntax
public static class ByteExtensions
Methods
View SourceAppend(Byte[], Byte[])
Appends a byte array to another byte array
Declaration
public static byte[] Append(this byte[] first, byte[] toAppend)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Byte[] | first | the first byte array |
| System.Byte[] | toAppend | the second byte array which will be appended to the first |
Returns
| Type | Description |
|---|---|
| System.Byte[] | the finished appended byte array |
GetBit(Byte, Int32)
Gets a specific bit in a byte
Declaration
public static bool GetBit(this byte b, int bitNumber)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Byte | b | the byte containing the bit |
| System.Int32 | bitNumber | the index of the bit within the byte (zero index based) |
Returns
| Type | Description |
|---|---|
| System.Boolean |