Skip to content

Commit 4e4a821

Browse files
committed
Use string.Equals for string comparison
1 parent c16ab3b commit 4e4a821

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/IronPython.Tests/AttrInjectorTest.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// The .NET Foundation licenses this file to you under the Apache 2.0 License.
33
// See the LICENSE file in the project root for more information.
44

5+
using System;
56
using System.Collections.Generic;
67
using System.Runtime.CompilerServices;
78
using System.Xml;
@@ -42,7 +43,7 @@ public static object GetBoundMember(object obj, string name) {
4243

4344
if (xml != null) {
4445
for (XmlNode n = xml.FirstChild; n != null; n = n.NextSibling) {
45-
if (n is XmlElement && string.CompareOrdinal(n.Name, name) == 0) {
46+
if (n is XmlElement && string.Equals(n.Name, name, StringComparison.Ordinal)) {
4647
if (n.HasChildNodes && n.FirstChild == n.LastChild && n.FirstChild is XmlText) {
4748
return n.InnerText;
4849
} else {

0 commit comments

Comments
 (0)