how to return a byte array in c# code example Example: string from byte array c# var str = System.Text.Encoding.Default.GetString(result);