From 16980374fd5f57fc9b40b27d3798be4fc446baeb Mon Sep 17 00:00:00 2001 From: Marc Brooks Date: Wed, 14 May 2014 17:14:45 -0500 Subject: [PATCH] At Signs have no case. Swapped in StringComparison.Ordinal for the literal comparison against @ since those are non-caseable. This is a micro-improvement, but still good practice. --- Src/Newtonsoft.Json/Converters/XmlNodeConverter.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Src/Newtonsoft.Json/Converters/XmlNodeConverter.cs b/Src/Newtonsoft.Json/Converters/XmlNodeConverter.cs index 6cf726c1..67ba7454 100644 --- a/Src/Newtonsoft.Json/Converters/XmlNodeConverter.cs +++ b/Src/Newtonsoft.Json/Converters/XmlNodeConverter.cs @@ -1349,7 +1349,7 @@ namespace Newtonsoft.Json.Converters string elementPrefix = MiscellaneousUtils.GetPrefix(propertyName); - if (propertyName.StartsWith("@")) + if (propertyName.StartsWith("@", StringComparison.Ordinal)) { string attributeName = propertyName.Substring(1); string attributeValue = reader.Value.ToString(); @@ -1777,4 +1777,4 @@ namespace Newtonsoft.Json.Converters } } -#endif \ No newline at end of file +#endif