MySqlDataReader.GetStream() throws IndexOutOfRangeException
问题 So I'm using the MySql.Data package for my .NET Core project and store password hashes and salts (of type byte[] ) as varbinary() to the database. When selecting the password hash and salt from a user I need a way to convert the result back to a byte array. Given this sample code Stream passwordHashStream = dbDataReader.GetStream(0); byte[] passwordHash; using (MemoryStream memoryStream = new MemoryStream()) { await passwordHashStream.CopyToAsync(memoryStream); passwordHash = memoryStream