Parameter names changed in reference assemblies

Some reference assembly parameter names have changed to match parameter names in the implementation assemblies.

Change description

In previous .NET versions, some reference assembly parameter names are different to their corresponding parameters in the implementation assembly. This can cause problems while using named arguments and reflection.

In .NET 5, these mismatched parameter names were updated in the reference assemblies to exactly match the corresponding parameter names in the implementation assemblies.

The following table shows the APIs and parameter names that changed.

API Old parameter name New parameter name
CodeGenerator.GenerateStatements(CodeStatementCollection) stms stmts
Icon.ISerializable.GetObjectData(SerializationInfo, StreamingContext) info si
Image.ISerializable.GetObjectData(SerializationInfo, StreamingContext) info si
IPAddress.Parse(ReadOnlySpan<Char>) ipString ipSpan
IPAddress.TryParse(ReadOnlySpan<Char>, IPAddress) ipString ipSpan
IsolatedStorageFileStream.BeginRead(Byte[], Int32, Int32, AsyncCallback, Object) buffer array
IsolatedStorageFileStream.BeginWrite(Byte[], Int32, Int32, AsyncCallback, Object) buffer array
NetworkCredential.GetCredential(String, Int32, String) authType authenticationType
ParenthesizePropertyNameAttribute.Equals(Object) o obj
RefreshPropertiesAttribute.Equals(Object) value obj
StackFrame(Boolean) fNeedFileInfo needFileInfo
StackFrame(Int32, Boolean) fNeedFileInfo needFileInfo
StringNormalizationExtensions.IsNormalized(String, NormalizationForm) value strInput
StringNormalizationExtensions.IsNormalized(String) value strInput
StringNormalizationExtensions.Normalize(String, NormalizationForm) value strInput
StringNormalizationExtensions.Normalize(String) value strInput

Reason for change

The parameter names were changed for consistency and to avoid failures when using named arguments and reflection.

Version introduced


If you encounter a compiler error due to a parameter name change, update the parameter name accordingly.

Affected APIs