4 overrides of Equals
System.Private.CoreLib (2)
src\libraries\System.Private.CoreLib\src\System\Reflection\ModifiedType.cs (1)
71public override bool Equals(Type? other) => throw new NotSupportedException(SR.NotSupported_ModifiedType);
src\libraries\System.Private.CoreLib\src\System\Reflection\SignatureType.cs (1)
68public sealed override bool Equals(Type? o) => base.Equals(o);
System.Reflection.MetadataLoadContext (2)
System\Reflection\TypeLoading\Types\RoFunctionPointerType.cs (1)
109public sealed override bool Equals([NotNullWhen(true)] Type? type) => Equals((object?)type);
System\Reflection\TypeLoading\Types\RoModifiedType.cs (1)
116public override bool Equals(Type? other) => throw new NotSupportedException(SR.NotSupported_ModifiedType);
167 references to Equals
dotnet-svcutil-lib (6)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\CollectionDataContract.cs (2)
982Type t = type.GetInterfaces().Where(it => it.Equals(interfaceType)).FirstOrDefault(); 1220Type t = type.GetInterfaces().Where(it => it.Equals(interfaceType)).FirstOrDefault();
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\Globals.cs (1)
1013if (!seq1[i].Equals(seq2[i]) && !seq1[i].IsAssignableFrom(seq2[i]))
FrameworkFork\System.ServiceModel\System\ServiceModel\MessageSecurityOverHttp.cs (2)
254if (!isSecureConversation && typeof(TSecurity).Equals(typeof(MessageSecurityOverHttp))) 395if (typeof(NonDualMessageSecurityOverHttp).Equals(typeof(TSecurity)))
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\ChannelProtectionRequirements.cs (1)
269if (!(message.Body.ReturnValue.GetType().Equals(typeof(MessagePartDescription))))
GetDocument.Insider (1)
.packages\microsoft.extensions.hostfactoryresolver.sources\10.0.0-preview.2.25102.2\contentFiles\cs\netstandard2.0\HostFactoryResolver.cs (1)
118&& typeof(string[]).Equals(factory.GetParameters()[0].ParameterType);
Microsoft.Arcade.Test.Common (1)
AssertEx.cs (1)
377if (type.Equals(typeof(T)))
Microsoft.AspNetCore.Http.Extensions (7)
HeaderDictionaryTypeExtensions.cs (6)
269methodInfo.ReturnParameter.ParameterType.Equals(typeof(bool))) 273&& methodParams[0].ParameterType.Equals(typeof(string)) 275&& methodParams[1].ParameterType.Equals(type.MakeByRefType())) 306&& methodInfo.ReturnParameter.ParameterType.Equals(typeof(Boolean))) 310&& methodParams[0].ParameterType.Equals(typeof(IList<string>)) 312&& methodParams[1].ParameterType.Equals(typeof(IList<T>).MakeByRefType());
src\Shared\ParameterBindingMethodCache.cs (1)
207return methodInfo.ReturnType.Equals(typeof(bool));
Microsoft.AspNetCore.InternalTesting (1)
xunit\ConditionalTheoryDiscoverer.cs (1)
56if (property != null && property.PropertyType.Equals(typeof(string)))
Microsoft.AspNetCore.Mvc.Abstractions (1)
src\Shared\ParameterBindingMethodCache.cs (1)
207return methodInfo.ReturnType.Equals(typeof(bool));
Microsoft.AspNetCore.Mvc.Core.Test (2)
DependencyInjection\MvcBuilderExtensionsTest.cs (2)
129Assert.Single(collection, d => d.ServiceType.Equals(typeof(ControllerOne))); 130Assert.Single(collection, d => d.ServiceType.Equals(typeof(ControllerTwo)));
Microsoft.AspNetCore.Mvc.NewtonsoftJson (7)
BsonTempDataSerializer.cs (7)
241type.Equals(typeof(decimal)) || 242type.Equals(typeof(string)) || 243type.Equals(typeof(DateTime)) || 244type.Equals(typeof(Guid)) || 245type.Equals(typeof(DateTimeOffset)) || 246type.Equals(typeof(TimeSpan)) || 247type.Equals(typeof(Uri));
Microsoft.AspNetCore.Mvc.Testing (1)
.packages\microsoft.extensions.hostfactoryresolver.sources\10.0.0-preview.2.25102.2\contentFiles\cs\netstandard2.0\HostFactoryResolver.cs (1)
118&& typeof(string[]).Equals(factory.GetParameters()[0].ParameterType);
Microsoft.AspNetCore.OpenApi (1)
src\Shared\ParameterBindingMethodCache.cs (1)
207return methodInfo.ReturnType.Equals(typeof(bool));
Microsoft.AspNetCore.TestHost (1)
.packages\microsoft.extensions.hostfactoryresolver.sources\10.0.0-preview.2.25102.2\contentFiles\cs\netstandard2.0\HostFactoryResolver.cs (1)
118&& typeof(string[]).Equals(factory.GetParameters()[0].ParameterType);
Microsoft.Build.Engine.UnitTests (3)
BackEnd\TaskRegistry_Tests.cs (3)
1351Assert.True(registry.TaskRegistrations[new TaskRegistry.RegisteredTaskIdentity("Name", null)][0].ParameterGroupAndTaskBody.UsingTaskParameters["ParameterWithAllAttributesHardCoded"].PropertyType.Equals(typeof(String))); 1366Assert.True(registry.TaskRegistrations[new TaskRegistry.RegisteredTaskIdentity("Name", null)][0].ParameterGroupAndTaskBody.UsingTaskParameters["ParameterWithAllAttributesHardCoded"].PropertyType.Equals(typeof(String))); 2128Assert.True(registry.TaskRegistrations[new TaskRegistry.RegisteredTaskIdentity("Name", null)][0].ParameterGroupAndTaskBody.UsingTaskParameters["ParameterWithAllAttributesHardCoded"].PropertyType.Equals(paramType));
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (2)
CommentSelection\CSharpToggleBlockCommentCommandHandlerTests.cs (1)
245.First(export => typeof(CSharpToggleBlockCommentCommandHandler).Equals(export.GetType()));
CommentSelection\CSharpToggleLineCommentCommandHandlerTests.cs (1)
1134.First(export => typeof(ToggleLineCommentCommandHandler).Equals(export.GetType()));
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
CommentSelection\ToggleBlockCommentCommandHandlerTests.cs (1)
1504.First(export => typeof(ToggleBlockCommentCommandHandler).Equals(export.GetType()));
Microsoft.CodeAnalysis.Scripting (1)
Hosting\ObjectFormatter\ObjectFormatterHelpers.cs (1)
102return type.Equals(other);
Microsoft.CodeAnalysis.VisualBasic (2)
Symbols\SubstitutedErrorType.vb (1)
259Not Me.GetType().Equals(obj.GetType()) Then
Symbols\SubstitutedNamedType.vb (1)
531Not Me.GetType().Equals(other.GetType()) Then
Microsoft.CSharp (9)
Microsoft\CSharp\RuntimeBinder\RuntimeBinderExtensions.cs (8)
121if (t1.Equals(t2)) 131return t1def.Equals(t2def); 145if (t1.Equals(t2)) 157if (t1.DeclaringMethod == null && member1.DeclaringType.Equals(t1.DeclaringType)) 159if (!(t2.DeclaringMethod == null && member2.DeclaringType.Equals(t2.DeclaringType))) 164else if (t2.DeclaringMethod == null && member2.DeclaringType.Equals(t2.DeclaringType)) 240args[position].Equals(typeInst); 244return member.DeclaringType.GetGenericArguments()[typeParam.GenericParameterPosition].Equals(typeInst);
Microsoft\CSharp\RuntimeBinder\SymbolTable.cs (1)
34public bool Equals(NameHashKey other) => Type.Equals(other.Type) && Name.Equals(other.Name);
Microsoft.DotNet.NuGetRepack.Tests (1)
TestHelpers\AssertEx.cs (1)
376if (type.Equals(typeof(T)))
Microsoft.Extensions.Features (1)
FeatureCollection.cs (1)
150return x.Key.Equals(y.Key);
Microsoft.ML.Core.Tests (1)
UnitTests\TestEntryPoints.cs (1)
370Assert.True(weightType.Equals(typeof(string)));
Microsoft.ML.Data (3)
Data\DataViewTypeManager.cs (1)
244var sameType = TargetType.Equals(other.TargetType);
DataView\TypedCursor.cs (1)
253if (!actualType.Equals(expectedType.RawType))
EntryPoints\EntryPointNode.cs (1)
854_host.Assert(bindings.Skip(1).All(binding => binding.GetType().Equals(firstBinding.GetType())));
Microsoft.ML.OnnxTransformer (3)
OnnxMapType.cs (2)
79return _keyType.Equals(otherSequence._keyType) && _valueType.Equals(otherSequence._valueType);
OnnxSequenceType.cs (1)
83return _elemType.Equals(otherSequence._elemType);
Microsoft.TestUtilities (1)
XUnit\ConditionalTheoryDiscoverer.cs (1)
59if (property != null && property.PropertyType.Equals(typeof(string)))
Microsoft.VisualBasic.Core (12)
Microsoft\VisualBasic\CompilerServices\Conversions.vb (2)
2637TargetType.GetGenericTypeDefinition().Equals(GetType(Nullable(Of ))) AndAlso 2639InvocationResult.GetType().Equals(TargetType.GetGenericArguments()(0))) Then
Microsoft\VisualBasic\CompilerServices\IDOBinder.vb (2)
856Return other IsNot Nothing AndAlso Type.Equals(other.Type) 1326Return If(valueExpression.Type.Equals(GetType(Object)), valueExpression, Expression.Convert(valueExpression, GetType(Object)))
Microsoft\VisualBasic\CompilerServices\Utils.vb (8)
242If t1.Equals(t2) Then 250Return t1def.Equals(t2def) 265If t1.Equals(t2) Then 274If t1.DeclaringMethod Is Nothing AndAlso member1.DeclaringType.Equals(t1.DeclaringType) Then 275If Not (t2.DeclaringMethod Is Nothing AndAlso member2.DeclaringType.Equals(t2.DeclaringType)) Then 278ElseIf t2.DeclaringMethod Is Nothing AndAlso member2.DeclaringType.Equals(t2.DeclaringType) Then 338args(position).Equals(typeInst) 340Return member.DeclaringType.GetGenericArguments()(typeParam.GenericParameterPosition).Equals(typeInst)
PresentationFramework (1)
System\Windows\ComponentResourceKey.cs (1)
106return ((key._typeInTargetAssembly != null) ? key._typeInTargetAssembly.Equals(this._typeInTargetAssembly) : (this._typeInTargetAssembly == null)) &&
ReachFramework (6)
Packaging\XpsFixedDocumentReaderWriter.cs (1)
315if (!value.GetType().Equals(typeof(PrintTicket)))
Packaging\XpsFixedDocumentSequenceReaderWriter.cs (1)
243if (!value.GetType().Equals(typeof(PrintTicket)))
Packaging\XpsFixedPageReaderWriter.cs (1)
512if (!value.GetType().Equals(typeof(PrintTicket)))
Serialization\ColorTypeConverter.cs (1)
250return typeof(string).Equals(type);
Serialization\FontTypeConverter.cs (1)
239return typeof(Uri).Equals(type);
Serialization\ImageSourceTypeConverter.cs (1)
321return typeof(Uri).Equals(type);
System.ComponentModel.TypeConverter (3)
System\ComponentModel\EnumConverter.cs (1)
26if (!type.IsEnum && !type.Equals(typeof(Enum)))
System\ComponentModel\ExtenderProvidedPropertyAttribute.cs (1)
79&& other.ReceiverType!.Equals(ReceiverType);
System\ComponentModel\LicenseProviderAttribute.cs (1)
99if (type != null && type.Equals(LicenseProvider))
System.Composition.Convention (1)
System\Composition\Convention\PartConventionBuilder.cs (1)
367Predicate<PropertyInfo> typedFilter = pi => pi.PropertyType.Equals(typeof(T)) && (propertyFilter == null || propertyFilter(pi));
System.Composition.Runtime (1)
System\Composition\Hosting\Core\CompositionContract.cs (1)
80contract._contractType.Equals(_contractType) &&
System.Data.Common (1)
System\Data\EnumerableRowCollectionExtensions.cs (1)
144if ((null != source) && source.ElementType.Equals(typeof(TResult)))
System.Linq.Expressions (5)
System\Linq\Expressions\Compiler\BoundConstants.cs (1)
44return object.ReferenceEquals(Value, other.Value) && Type.Equals(other.Type);
System\Linq\Expressions\Interpreter\LightCompiler.cs (4)
1078if (operandType.IsNullableType() && parameterType.Equals(operandType.GetNonNullableType())) 1117if (typeTo.Equals(typeFrom)) 1124typeTo.GetNonNullableType().Equals(typeFrom)) 1132typeFrom.GetNonNullableType().Equals(typeTo))
System.Private.CoreLib (5)
src\libraries\System.Private.CoreLib\src\System\Attribute.cs (1)
102if (!thisValueType.Equals(thatValue.GetType()))
src\libraries\System.Private.CoreLib\src\System\DefaultBinder.cs (1)
811if (!pCls.Equals(types[j]))
src\libraries\System.Private.CoreLib\src\System\Reflection\SignatureType.cs (1)
68public sealed override bool Equals(Type? o) => base.Equals(o);
src\libraries\System.Private.CoreLib\src\System\Type.cs (2)
683public override bool Equals(object? o) => o == null ? false : Equals(o as Type); 705return left.Equals(right);
System.Private.DataContractSerialization (3)
System\Runtime\Serialization\CollectionDataContract.cs (2)
996Type? t = type.GetInterfaces().Where(it => it.Equals(interfaceType)).FirstOrDefault(); 1293Type? t = type.GetInterfaces().Where(it => it.Equals(interfaceType)).FirstOrDefault();
System\Runtime\Serialization\PrimitiveDataContract.cs (1)
130return (thisType.Equals(otherType) || thisType.IsSubclassOf(otherType) || otherType.IsSubclassOf(thisType));
System.Reflection.Context (8)
System\Reflection\Context\CustomReflectionContext.cs (1)
129else if (!vp.DeclaringType.Equals(type))
System\Reflection\Context\Projection\ProjectingType.cs (1)
327UnderlyingType.Equals(other.UnderlyingType);
System\Reflection\Context\Virtual\InheritedMethodInfo.cs (2)
23Debug.Assert(baseMethod.ReflectedType!.Equals(baseMethod.DeclaringType)); 40ReflectedType.Equals(other.ReflectedType);
System\Reflection\Context\Virtual\InheritedPropertyInfo.cs (2)
23Debug.Assert(baseProperty.ReflectedType!.Equals(baseProperty.DeclaringType)); 58ReflectedType.Equals(other.ReflectedType);
System\Reflection\Context\Virtual\VirtualMethodBase.cs (1)
123DeclaringType!.Equals(other.DeclaringType) &&
System\Reflection\Context\Virtual\VirtualPropertyBase.cs (1)
183_declaringType!.Equals(other._declaringType) &&
System.Reflection.Emit (1)
System\Reflection\Emit\TypeBuilderImpl.cs (1)
748if (argType == null || !argType.Equals(paramType))
System.Reflection.MetadataLoadContext (37)
System\Reflection\DefaultBinder.cs (1)
297if (!pCls.Equals(types[j]))
System\Reflection\Runtime\BindingFlagSupport\ConstructorPolicies.cs (1)
22Debug.Assert(reflectedType.Equals(type)); // Constructor queries are always performed as if BindingFlags.DeclaredOnly are set so the reflectedType should always be the declaring type.
System\Reflection\Runtime\BindingFlagSupport\MemberPolicies.cs (9)
99if (!(parameterType1.Equals(parameterType2))) 129if (t1.Equals(t2)) 156if (!(t1.GetGenericTypeDefinition().Equals(t2.GetGenericTypeDefinition()))) 189if (t.Equals(typeof(FieldInfo))) 194else if (t.Equals(typeof(MethodInfo))) 199else if (t.Equals(typeof(ConstructorInfo))) 204else if (t.Equals(typeof(PropertyInfo))) 209else if (t.Equals(typeof(EventInfo))) 214else if (t.Equals(typeof(Type)))
System\Reflection\Runtime\BindingFlagSupport\NestedTypePolicies.cs (1)
28Debug.Assert(reflectedType.Equals(type)); // NestedType queries are always performed as if BindingFlags.DeclaredOnly are set so the reflectedType should always be the declaring type.
System\Reflection\Runtime\BindingFlagSupport\PropertyPolicies.cs (1)
71if (!(prior.PropertyType.Equals(member.PropertyType)))
System\Reflection\Runtime\BindingFlagSupport\QueryResult.cs (1)
114if (match.DeclaringType!.Equals(challenger.DeclaringType))
System\Reflection\TypeLoading\General\Assignability.cs (22)
18if (fromTypeInfo.Equals(toTypeInfo)) 48if (nullableUnderlyingType.Equals(fromTypeInfo)) 57if (fromTypeInfo.Equals(toTypeInfo)) 103if (toTypeInfo.Equals(coreTypes[CoreType.Object])) 106if (toTypeInfo.Equals(coreTypes[CoreType.UIntPtr])) 125if (toTypeInfo.Equals(coreTypes[CoreType.Object])) 128if (toTypeInfo.Equals(coreTypes[CoreType.ValueType])) 162if (toTypeInfo.Equals(coreTypes[CoreType.Object]) && fromTypeInfo.IsInterface) 187if (fromTypeInfo.Equals(toTypeInfo)) 194if (!genericTypeDefinition.Equals(toTypeInfo.GetGenericTypeDefinition())) 219if (!(fromTypeArgumentInfo.Equals(toTypeArgumentInfo))) 247if (reducedFromType.Equals(reducedToType)) 258if (t.Equals(coreTypes[CoreType.Byte])) 261if (t.Equals(coreTypes[CoreType.UInt16])) 264if (t.Equals(coreTypes[CoreType.UInt32])) 267if (t.Equals(coreTypes[CoreType.UInt64])) 280if (fromTypeInfo.Equals(toTypeInfo)) 326return t.IsClass && !t.Equals(coreTypes[CoreType.Object]) && !t.Equals(coreTypes[CoreType.ValueType]) && !t.Equals(coreTypes[CoreType.Enum]); 352if (ifcGenericTypeDefinition.Equals(toTypeGenericTypeDefinition)) 365if (ifc.Equals(toTypeInfo))
System\Reflection\TypeLoading\Types\RoType.cs (1)
29return base.Equals(objType);
System.Security.Cryptography.Xml (1)
System\Security\Cryptography\Xml\KeyInfo.cs (1)
144if (requestedObjectType.Equals(tempObj.GetType()))
System.ServiceModel.Syndication (2)
System\ServiceModel\Syndication\SyndicationFeedFormatter.cs (1)
502if (feedType.Equals(typeof(SyndicationFeed)))
System\ServiceModel\Syndication\SyndicationItemFormatter.cs (1)
53if (itemType.Equals(typeof(SyndicationItem)))
System.Windows.Forms (6)
System\Resources\ResXDataNode.cs (1)
128if (nodeType is not null && nodeType.Equals(typeof(ResXFileRef)))
System\Windows\Forms\ActiveX\AxHost.AxPropertyDescriptor.cs (1)
120return editorBaseType.Equals(typeof(UITypeEditor)) && _editor is not null
System\Windows\Forms\Controls\DataGridView\DataGridView.DataConnection.cs (3)
913if (type.Equals(typeof(bool)) || type.Equals(typeof(CheckState))) 915dataGridViewColumn = new DataGridViewCheckBoxColumn(type.Equals(typeof(CheckState)));
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.cs (1)
1134&& entry.PropertyType.Equals(PropertyType)
System.Windows.Forms.Design (4)
System\Drawing\Design\ImageEditor.cs (1)
92&& !myClass.Equals(editorClass)
System\Windows\Forms\Design\DesignBindingPicker.cs (1)
1433if (dsType is not null && dsType.Equals(comp.GetType()))
System\Windows\Forms\Design\ImageListImageEditor.cs (1)
57&& !myClass.Equals(editorClass)
System\Windows\Forms\Design\ToolStripItemDesigner.cs (1)
686if (pd is not null && pd.PropertyType.Equals(typeof(string)))
System.Windows.Forms.Primitives.TestUtilities (1)
Extensions\AssertExtensions.cs (1)
219if (exceptionTypes.Any(t => t.Equals(exceptionType)))
System.Xaml (3)
System\Xaml\Schema\MemberReflector.cs (1)
256if (!derivedType.Equals(method.DeclaringType) && !derivedType.IsSubclassOf(method.DeclaringType))
System\Xaml\XamlLanguage.cs (2)
251if (type.Equals(typeof(MemberDefinition))) 256if (type.Equals(typeof(PropertyDefinition)))
UnitTests.Common (2)
TestHelpers.cs (2)
126if (!expectedType.Equals(contractType)) 192if (messageData.MessageType != null && !messageData.MessageType.Equals(messageDesc.MessageType))
xunit.assert (7)
EventAsserts.cs (5)
70 if (raisedEvent.Arguments != null && !raisedEvent.Arguments.GetType().Equals(typeof(T))) 95 if (raisedEvent.Arguments != null && !raisedEvent.Arguments.GetType().Equals(typeof(T))) 126 if (raisedEvent.Arguments != null && !raisedEvent.Arguments.GetType().Equals(typeof(T))) 298 if (raisedEvent.Arguments != null && !raisedEvent.Arguments.GetType().Equals(typeof(T))) 323 if (raisedEvent.Arguments != null && !raisedEvent.Arguments.GetType().Equals(typeof(T)))
ExceptionAsserts.cs (1)
44 if (!exceptionType.Equals(exception.GetType()))
TypeAsserts.cs (1)
136 if (@object != null && expectedType.Equals(@object.GetType()))