Finden, Ersten Bestimmten Byte in ein Byte[] Array in c#

Ich habe ein byte-array und wünschen zu finden, das erste auftreten (wenn überhaupt) von einem bestimmten byte.

Könnt Ihr mir helfen mit eine schöne, elegante und effiziente Art und Weise, es zu tun?

 ///Summary
///Finds the first occurance of a specific byte in a byte array.
///If not found, returns -1.
public int GetFirstOccurance(byte byteToFind, byte[] byteArray)
{

}

InformationsquelleAutor divinci | 2009-06-10

Schreibe einen Kommentar