Class ByteCollection
A collection of bytes.
Inheritance
Namespace: FM.LiveSwitch
Assembly: FM.LiveSwitch.dll
Syntax
public class ByteCollection : object
Constructors
ByteCollection()
Initializes a new instance of the Byte
Declaration
public ByteCollection()
ByteCollection(Byte[])
Initializes a new instance of the Byte
Declaration
public ByteCollection(byte[] buffer)
Parameters
Type | Name | Description |
---|---|---|
System. |
buffer | The bytes to use as initial data. |
Properties
Count
Gets the number of bytes in the collection.
Declaration
public int Count { get; }
Property Value
Type | Description |
---|---|
System. |
Methods
Add(Byte)
Adds a byte to the collection.
Declaration
public void Add(byte b)
Parameters
Type | Name | Description |
---|---|---|
System. |
b | The byte to add. |
AddRange(ByteCollection)
Adds a byte collection to this collection.
Declaration
public void AddRange(ByteCollection collection)
Parameters
Type | Name | Description |
---|---|---|
Byte |
collection | The byte collection to add. |
AddRange(Byte[])
Adds a range of bytes to the collection.
Declaration
public void AddRange(byte[] buffer)
Parameters
Type | Name | Description |
---|---|---|
System. |
buffer | The range of bytes to add. |
Get(Int32)
Gets a byte from the collection.
Declaration
public byte Get(int index)
Parameters
Type | Name | Description |
---|---|---|
System. |
index | The index to get. |
Returns
Type | Description |
---|---|
System. |
GetRange(Int32, Int32)
Gets a range of bytes from the collection.
Declaration
public byte[] GetRange(int index, int count)
Parameters
Type | Name | Description |
---|---|---|
System. |
index | The index to start getting. |
System. |
count | The number of bytes to get. |
Returns
Type | Description |
---|---|
System. |
InsertRange(Int32, ByteCollection)
Inserts a byte collection into this collection.
Declaration
public void InsertRange(int index, ByteCollection collection)
Parameters
Type | Name | Description |
---|---|---|
System. |
index | The index to start adding. |
Byte |
collection | The byte collection to insert. |
InsertRange(Int32, Byte[])
Inserts a range of bytes into the collection.
Declaration
public void InsertRange(int index, byte[] buffer)
Parameters
Type | Name | Description |
---|---|---|
System. |
index | The index to start adding. |
System. |
buffer | The range of bytes to insert. |
RemoveRange(Int32, Int32)
Removes a range of bytes from the collection.
Declaration
public void RemoveRange(int index, int count)
Parameters
Type | Name | Description |
---|---|---|
System. |
index | The index to start removing. |
System. |
count | The number of bytes to remove. |
ToArray()
Converts this collection to an array.
Declaration
public byte[] ToArray()
Returns
Type | Description |
---|---|
System. |