@@ -691,7 +691,7 @@ private unsafe RuntimeMethodInfo[] PopulateMethods(Filter filter)
691691 }
692692
693693 declaringType = RuntimeTypeHandle . GetBaseType ( declaringType ) ;
694- } while ( ! ( declaringType is null ) ) ;
694+ } while ( declaringType is object ) ;
695695 }
696696
697697 return list . ToArray ( ) ;
@@ -763,7 +763,7 @@ private unsafe RuntimeFieldInfo[] PopulateFields(Filter filter)
763763 while ( RuntimeTypeHandle . IsGenericVariable ( declaringType ) )
764764 declaringType = declaringType . GetBaseType ( ) ;
765765
766- while ( ! ( declaringType is null ) )
766+ while ( declaringType is object )
767767 {
768768 PopulateRtFields ( filter , declaringType , ref list ) ;
769769
@@ -1112,7 +1112,7 @@ private unsafe RuntimeEventInfo[] PopulateEvents(Filter filter)
11121112 declaringType = declaringType . GetBaseType ( ) ;
11131113
11141114 // Populate associates off of the class hierarchy
1115- while ( ! ( declaringType is null ) )
1115+ while ( declaringType is object )
11161116 {
11171117 PopulateEvents ( filter , declaringType , csEventInfos , ref list ) ;
11181118 declaringType = RuntimeTypeHandle . GetBaseType ( declaringType ) ;
@@ -1216,7 +1216,7 @@ private unsafe RuntimePropertyInfo[] PopulateProperties(Filter filter)
12161216 {
12171217 PopulateProperties ( filter , declaringType , csPropertyInfos , usedSlots , ref list ) ;
12181218 declaringType = RuntimeTypeHandle . GetBaseType ( declaringType ) ;
1219- } while ( ! ( declaringType is null ) ) ;
1219+ } while ( declaringType is object ) ;
12201220 }
12211221 else
12221222 {
@@ -1303,7 +1303,7 @@ private unsafe void PopulateProperties(
13031303 associateMethod = propertyInfo . GetSetMethod ( ) ;
13041304 }
13051305
1306- if ( ! ( associateMethod is null ) )
1306+ if ( associateMethod is object )
13071307 {
13081308 int slot = RuntimeMethodHandle . GetSlot ( ( RuntimeMethodInfo ) associateMethod ) ;
13091309
@@ -1565,7 +1565,7 @@ internal string GetDefaultMemberName()
15651565 {
15661566 CustomAttributeData attr = null ;
15671567 Type DefaultMemberAttrType = typeof ( DefaultMemberAttribute ) ;
1568- for ( RuntimeType t = m_runtimeType ; ! ( t is null ) ; t = t . GetBaseType ( ) )
1568+ for ( RuntimeType t = m_runtimeType ; t is object ; t = t . GetBaseType ( ) )
15691569 {
15701570 IList < CustomAttributeData > attrs = CustomAttributeData . GetCustomAttributes ( t ) ;
15711571 for ( int i = 0 ; i < attrs . Count ; i ++ )
@@ -1612,7 +1612,7 @@ internal MethodInfo GetGenericMethodInfo(RuntimeMethodHandleInternal genericMeth
16121612 {
16131613 crmi = s_methodInstantiations [ rmi ] ;
16141614 }
1615- if ( ! ( crmi is null ) )
1615+ if ( crmi is object )
16161616 return crmi ;
16171617
16181618 if ( s_methodInstantiationsLock == null )
@@ -1627,14 +1627,14 @@ internal MethodInfo GetGenericMethodInfo(RuntimeMethodHandleInternal genericMeth
16271627 if ( la != null )
16281628 {
16291629 crmi = la . m_methodInstantiations [ rmi ] ;
1630- if ( ! ( crmi is null ) )
1630+ if ( crmi is object )
16311631 return crmi ;
16321632 la . m_methodInstantiations [ rmi ] = rmi ;
16331633 }
16341634 else
16351635 {
16361636 crmi = s_methodInstantiations [ rmi ] ;
1637- if ( ! ( crmi is null ) )
1637+ if ( crmi is object )
16381638 return crmi ;
16391639 s_methodInstantiations [ rmi ] = rmi ;
16401640 }
@@ -1795,7 +1795,7 @@ internal static unsafe MethodBase GetMethodBase(RuntimeType reflectedType, Runti
17951795
17961796 RuntimeType baseType = reflectedType ;
17971797
1798- while ( ! ( baseType is null ) )
1798+ while ( baseType is object )
17991799 {
18001800 RuntimeType baseDefinition = baseType ;
18011801
@@ -2340,7 +2340,7 @@ private static bool FilterApplyMethodBase(
23402340 for ( int i = 0 ; i < parameterInfos . Length ; i ++ )
23412341 {
23422342 // a null argument type implies a null arg which is always a perfect match
2343- if ( ! ( argumentTypes [ i ] is null ) && ! argumentTypes [ i ] . MatchesParameterTypeExactly ( parameterInfos [ i ] ) )
2343+ if ( argumentTypes [ i ] is object && ! argumentTypes [ i ] . MatchesParameterTypeExactly ( parameterInfos [ i ] ) )
23442344 return false ;
23452345 }
23462346 }
@@ -2806,7 +2806,7 @@ protected override PropertyInfo GetPropertyImpl(
28062806 {
28072807 PropertyInfo firstCandidate = candidates [ 0 ] ;
28082808
2809- if ( ! ( returnType is null ) && ! returnType . IsEquivalentTo ( firstCandidate . PropertyType ) )
2809+ if ( returnType is object && ! returnType . IsEquivalentTo ( firstCandidate . PropertyType ) )
28102810 return null ;
28112811
28122812 return firstCandidate ;
@@ -2847,7 +2847,7 @@ public override EventInfo GetEvent(string name, BindingFlags bindingAttr)
28472847 RuntimeEventInfo eventInfo = cache [ i ] ;
28482848 if ( ( bindingAttr & eventInfo . BindingFlags ) == eventInfo . BindingFlags )
28492849 {
2850- if ( ! ( match is null ) )
2850+ if ( match is object )
28512851 throw new AmbiguousMatchException ( SR . Arg_AmbiguousMatchException ) ;
28522852
28532853 match = eventInfo ;
@@ -2876,7 +2876,7 @@ public override FieldInfo GetField(string name, BindingFlags bindingAttr)
28762876 RuntimeFieldInfo fieldInfo = cache [ i ] ;
28772877 if ( ( bindingAttr & fieldInfo . BindingFlags ) == fieldInfo . BindingFlags )
28782878 {
2879- if ( ! ( match is null ) )
2879+ if ( match is object )
28802880 {
28812881 if ( ReferenceEquals ( fieldInfo . DeclaringType , match . DeclaringType ) )
28822882 throw new AmbiguousMatchException ( SR . Arg_AmbiguousMatchException ) ;
@@ -2923,7 +2923,7 @@ public override Type GetInterface(string fullname, bool ignoreCase)
29232923 RuntimeType iface = cache [ i ] ;
29242924 if ( FilterApplyType ( iface , bindingAttr , name , false , ns ) )
29252925 {
2926- if ( ! ( match is null ) )
2926+ if ( match is object )
29272927 throw new AmbiguousMatchException ( SR . Arg_AmbiguousMatchException ) ;
29282928
29292929 match = iface ;
@@ -2953,7 +2953,7 @@ public override Type GetNestedType(string fullname, BindingFlags bindingAttr)
29532953 RuntimeType nestedType = cache [ i ] ;
29542954 if ( FilterApplyType ( nestedType , bindingAttr , name , false , ns ) )
29552955 {
2956- if ( ! ( match is null ) )
2956+ if ( match is object )
29572957 throw new AmbiguousMatchException ( SR . Arg_AmbiguousMatchException ) ;
29582958
29592959 match = nestedType ;
@@ -3151,7 +3151,7 @@ public override bool IsSubclassOf(Type type)
31513151
31523152 RuntimeType baseType = GetBaseType ( ) ;
31533153
3154- while ( ! ( baseType is null ) )
3154+ while ( baseType is object )
31553155 {
31563156 if ( baseType == rtType )
31573157 return true ;
@@ -3962,7 +3962,7 @@ public override object InvokeMember(
39623962 selFld = binder . BindToField ( bindingFlags , flds , IsGetField ? Empty . Value : providedArgs [ 0 ] , culture ) ;
39633963 }
39643964
3965- if ( ! ( selFld is null ) )
3965+ if ( selFld is object )
39663966 {
39673967 // Invocation on a field
39683968 if ( selFld . FieldType . IsArray || ReferenceEquals ( selFld . FieldType , typeof ( Array ) ) )
@@ -4148,7 +4148,7 @@ public override object InvokeMember(
41484148 }
41494149 }
41504150
4151- if ( ! ( finalist is null ) )
4151+ if ( finalist is object )
41524152 {
41534153 // Invoke
41544154 if ( finalists == null &&
0 commit comments