From 14ed23d544f17f209cb4094da27c96856857f610 Mon Sep 17 00:00:00 2001 From: Chomp Date: Tue, 14 Jan 2025 14:25:16 +0000 Subject: [PATCH] Make use of `string.Equals` inside `GetSetMethod` --- Core/Utils/ImporterUtil.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Core/Utils/ImporterUtil.cs b/Core/Utils/ImporterUtil.cs index 4bc42269..03960bd8 100644 --- a/Core/Utils/ImporterUtil.cs +++ b/Core/Utils/ImporterUtil.cs @@ -117,7 +117,8 @@ public class ImporterUtil { var matchedProperty = type.GetProperties() .FirstOrDefault(prop => - prop.Name.ToLower() == _fileUtil.StripExtension(propertyName).ToLower()); + string.Equals(prop.Name.ToLower(), _fileUtil.StripExtension(propertyName).ToLower(), + StringComparison.Ordinal)); if (matchedProperty == null) throw new Exception( $"Unable to find property '{_fileUtil.StripExtension(propertyName)}' for type '{type.Name}'");