Repro:
using (var command = new SqlCommand(null, null))
{
_ = command.Parameters["@foo"];
}
System.IndexOutOfRangeException: An SqlParameter with ParameterName '@foo' is not contained by this SqlParameterCollection.
Expected: "A SqlParameter," not "An SqlParameter"
Source:
https://github.com/dotnet/corefx/blob/6739eab2f4ee9a895575289893edf63b6c234d43/src/System.Data.SqlClient/src/Resources/Strings.resx#L122-L124