@@ -92,7 +92,7 @@ public IEnumerable<MemberInfo> GetFieldsAndProperties(Type type, BindingFlags fl
9292 static bool NonBackingFieldFilter ( MemberInfo x )
9393 {
9494 return x . MemberType == MemberTypes . Field
95- && ! x . Name . EndsWith ( BackingFieldSuffix ) ;
95+ && ! x . Name . EndsWith ( BackingFieldSuffix , StringComparison . Ordinal ) ;
9696 }
9797
9898 static bool IndexerFilter ( MemberInfo x )
@@ -109,10 +109,10 @@ static bool IndexerFilter(MemberInfo x)
109109 public bool IsHarvestable ( Type type )
110110 {
111111 var typename = type . ToString ( ) ;
112- if ( typename . StartsWith ( "System.Reflection" )
113- || typename . StartsWith ( "System.Runtime" )
114- || typename . StartsWith ( "System.SignatureStruct" )
115- || typename . StartsWith ( "System.Func" ) )
112+ if ( typename . StartsWith ( "System.Reflection" , StringComparison . Ordinal )
113+ || typename . StartsWith ( "System.Runtime" , StringComparison . Ordinal )
114+ || typename . StartsWith ( "System.SignatureStruct" , StringComparison . Ordinal )
115+ || typename . StartsWith ( "System.Func" , StringComparison . Ordinal ) )
116116 return false ;
117117 return true ;
118118 }
@@ -122,7 +122,7 @@ public bool IsHarvestable(Type type)
122122 /// </summary>
123123 public string SanitizeFieldName ( string fieldName )
124124 {
125- return fieldName . StartsWith ( "<" )
125+ return fieldName . StartsWith ( "<" , StringComparison . Ordinal )
126126 ? fieldName . Substring ( 1 ) . Replace ( BackingFieldSuffix , "" )
127127 : fieldName ;
128128 }
0 commit comments