in C# per effettuare un casting basta fare (byte[])object ed il cast è fatto.