Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Some parameter names have changed to be consistent between reference and implementation assemblies. Most of the changes are in the reference assemblies, but a handful are in the implementation assemblies.
Previous behavior
Some reference assembly parameter names were different to their corresponding parameters in the implementation assembly. This can cause problems while using named arguments and reflection.
New behavior
In .NET 6, these mismatched parameter names were updated to be consistent across the reference and implementation assemblies.
The following table shows the APIs and parameter names that changed. In addition, some parameter names on Stream
-derived types were changed.
Reason for change
- In cases where the reference assembly parameter names were changed, the new names were deemed more appropriate or readable and minimally breaking.
- In cases where the names of runtime parameters were changed to gain consistency across platforms or with reference assemblies, the runtime implementation now matches the public API and documentation for the method.
Version introduced
.NET 6
Recommended action
If you encounter a compiler error due to a parameter name change, update the parameter name accordingly.
If you use run-time reflection to inspect methods and took a dependency on the parameter names, update the code to use the new parameter names.
Affected APIs
- Microsoft.VisualBasic.Strings.InStr(Int32, String, String, CompareMethod)
- System.Attribute.GetCustomAttributes(MemberInfo, Type)
- System.Attribute.GetCustomAttributes(MemberInfo, Type, Boolean)
- System.Collections.Generic.SortedList<TKey,TValue>.System.Collections.ICollection.CopyTo(Array, Int32)
- System.IO.StreamWriter.WriteLine(ReadOnlySpan<Char>)
- System.IO.FileStream.BeginRead(Byte[], Int32, Int32, AsyncCallback, Object)
- System.IO.FileStream.BeginWrite(Byte[], Int32, Int32, AsyncCallback, Object)
- System.IO.MemoryStream.Read(Span<Byte>)
- System.IO.MemoryStream.ReadAsync(Memory<Byte>, CancellationToken)
- System.IO.MemoryStream.Write(ReadOnlySpan<Byte>)
- System.IO.MemoryStream.WriteAsync(ReadOnlyMemory<Byte>, CancellationToken)
- System.IO.UnmanagedMemoryStream.Read(Span<Byte>)
- System.IO.UnmanagedMemoryStream.Write(ReadOnlySpan<Byte>)
- System.Numerics.Vector.Narrow
- System.Numerics.Vector.Widen
- System.Security.Cryptography.Pkcs.Rfc3161TimestampRequest.ProcessResponse(ReadOnlyMemory<Byte>, Int32)
- System.Security.Cryptography.Pkcs.Rfc3161TimestampToken.TryDecode(ReadOnlyMemory<Byte>, Rfc3161TimestampToken, Int32)
- System.Security.Cryptography.Pkcs.Rfc3161TimestampTokenInfo.Rfc3161TimestampTokenInfo(Oid, Oid, ReadOnlyMemory<Byte>, ReadOnlyMemory<Byte>, DateTimeOffset, Nullable<Int64>, Boolean, Nullable<ReadOnlyMemory<Byte>>, Nullable<ReadOnlyMemory<Byte>>, X509ExtensionCollection)
- System.Security.Cryptography.Pkcs.Rfc3161TimestampTokenInfo.TryDecode(ReadOnlyMemory<Byte>, Rfc3161TimestampTokenInfo, Int32)
- System.Security.Cryptography.Pkcs.SignerInfo.AddUnsignedAttribute(AsnEncodedData)
- System.Security.Cryptography.Pkcs.SignerInfo.RemoveUnsignedAttribute(AsnEncodedData)
- System.Security.Permissions.PrincipalPermission.Equals(Object)
- System.Security.Policy.UrlMembershipCondition.Equals(Object)
- DBDataPermission(DBDataPermission)
- DBDataPermission(DBDataPermissionAttribute)
- DBDataPermission(PermissionState, Boolean)
- System.Data.Common.DBDataPermission.FromXml(SecurityElement)
- System.Data.Common.DBDataPermission.Union(IPermission)