diff --git a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/VersionConverter.cs b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/VersionConverter.cs index 0d7bf0e2b672df..e42d19bc01b9ff 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/VersionConverter.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/VersionConverter.cs @@ -94,7 +94,7 @@ public override bool IsValid(ITypeDescriptorContext? context, object? value) { if (value is string version) { - return Version.TryParse(version, out Version _); + return Version.TryParse(version, out _); } return value is Version; } diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPoolManager.cs b/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPoolManager.cs index fdfcd5fa7cce01..ebfb5882f55a47 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPoolManager.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPoolManager.cs @@ -494,7 +494,7 @@ private void RemoveStalePools() { if (entry.Value.CleanCacheAndDisposeIfUnused()) { - _pools.TryRemove(entry.Key, out HttpConnectionPool _); + _pools.TryRemove(entry.Key, out _); } } diff --git a/src/libraries/System.Private.CoreLib/src/System/TimeZoneInfo.cs b/src/libraries/System.Private.CoreLib/src/System/TimeZoneInfo.cs index b3e8964bdb5293..3c8f5119b7d2ac 100644 --- a/src/libraries/System.Private.CoreLib/src/System/TimeZoneInfo.cs +++ b/src/libraries/System.Private.CoreLib/src/System/TimeZoneInfo.cs @@ -891,7 +891,7 @@ public static TimeZoneInfo CreateCustomTimeZone( string? displayName, string? standardDisplayName) { - bool hasIanaId = TimeZoneInfo.TryConvertIanaIdToWindowsId(id, allocate: false, out string _); + bool hasIanaId = TimeZoneInfo.TryConvertIanaIdToWindowsId(id, allocate: false, out _); return new TimeZoneInfo( id, @@ -942,7 +942,7 @@ public static TimeZoneInfo CreateCustomTimeZone( adjustmentRules = (AdjustmentRule[])adjustmentRules.Clone(); } - bool hasIanaId = TimeZoneInfo.TryConvertIanaIdToWindowsId(id, allocate: false, out string _); + bool hasIanaId = TimeZoneInfo.TryConvertIanaIdToWindowsId(id, allocate: false, out _); return new TimeZoneInfo( id, diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/DataContractSet.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/DataContractSet.cs index 49ccecede632e9..1f1c04e5934d54 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/DataContractSet.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/DataContractSet.cs @@ -650,7 +650,7 @@ internal IEnumerator> GetEnumerator public void ImportSchemaSet(XmlSchemaSet schemaSet, IEnumerable? typeNames, bool importXmlDataType) { SchemaImporter importer = new SchemaImporter(schemaSet, typeNames, null, this, importXmlDataType); - importer.Import(out List _); + importer.Import(out _); } [RequiresDynamicCode(DataContract.SerializerAOTWarning)] diff --git a/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/Parameters/Ecma/EcmaFatMethodParameter.cs b/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/Parameters/Ecma/EcmaFatMethodParameter.cs index 099a41b7e6d568..46840458ac2f1d 100644 --- a/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/Parameters/Ecma/EcmaFatMethodParameter.cs +++ b/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/Parameters/Ecma/EcmaFatMethodParameter.cs @@ -37,7 +37,7 @@ internal EcmaFatMethodParameter(IRoMethodBase roMethodBase, int position, Type p protected sealed override IEnumerable GetTrueCustomAttributes() => Parameter.GetCustomAttributes().ToTrueCustomAttributes(GetEcmaModule()); - public sealed override bool HasDefaultValue => TryGetRawDefaultValue(out object _); + public sealed override bool HasDefaultValue => TryGetRawDefaultValue(out _); public sealed override object? RawDefaultValue {