C# Class System.Windows.Forms.ByteCollection

Represents a collection of bytes.
Inheritance: System.Collections.CollectionBase
Show file Open project: Zepheus/Fiesta_Utils Class Usage Examples

Public Methods

Method Description
Add ( byte b ) : void

Adds a byte into the collection.

AddRange ( byte bs ) : void

Adds a range of bytes to the collection.

ByteCollection ( ) : System

Initializes a new instance of ByteCollection class.

ByteCollection ( byte bs ) : System

Initializes a new instance of ByteCollection class.

Contains ( bool b ) : bool

Returns true, if the byte exists in the collection.

CopyTo ( byte bs, int index ) : void

Copies the content of the collection into the given array.

GetBytes ( ) : byte[]

Gets all bytes in the array

IndexOf ( byte b ) : int

Returns the index of the given byte.

Insert ( int index, byte b ) : void

Inserts a byte to the collection.

InsertRange ( int index, byte bs ) : void

Inserts a range of bytes to the collection.

Remove ( byte b ) : void

Removes a byte from the collection.

RemoveRange ( int index, int count ) : void

Removes a range of bytes from the collection.

ToArray ( ) : byte[]

Copies the content of the collection into an array.

this ( int index ) : byte

Gets or sets the value of a byte

Method Details

Add() public method

Adds a byte into the collection.
public Add ( byte b ) : void
b byte the byte to add
return void

AddRange() public method

Adds a range of bytes to the collection.
public AddRange ( byte bs ) : void
bs byte the bytes to add
return void

ByteCollection() public method

Initializes a new instance of ByteCollection class.
public ByteCollection ( ) : System
return System

ByteCollection() public method

Initializes a new instance of ByteCollection class.
public ByteCollection ( byte bs ) : System
bs byte an array of bytes to add to collection
return System

Contains() public method

Returns true, if the byte exists in the collection.
public Contains ( bool b ) : bool
b bool
return bool

CopyTo() public method

Copies the content of the collection into the given array.
public CopyTo ( byte bs, int index ) : void
bs byte
index int
return void

GetBytes() public method

Gets all bytes in the array
public GetBytes ( ) : byte[]
return byte[]

IndexOf() public method

Returns the index of the given byte.
public IndexOf ( byte b ) : int
b byte
return int

Insert() public method

Inserts a byte to the collection.
public Insert ( int index, byte b ) : void
index int the index
b byte a byte to insert
return void

InsertRange() public method

Inserts a range of bytes to the collection.
public InsertRange ( int index, byte bs ) : void
index int the index of start byte
bs byte an array of bytes to insert
return void

Remove() public method

Removes a byte from the collection.
public Remove ( byte b ) : void
b byte the byte to remove
return void

RemoveRange() public method

Removes a range of bytes from the collection.
public RemoveRange ( int index, int count ) : void
index int the index of the start byte
count int the count of the bytes to remove
return void

ToArray() public method

Copies the content of the collection into an array.
public ToArray ( ) : byte[]
return byte[]

this() public method

Gets or sets the value of a byte
public this ( int index ) : byte
index int
return byte