From cd9d36a51d46c894c8cdffc616c481bbc5ed43fa Mon Sep 17 00:00:00 2001 From: Brett Hewitson Date: Wed, 15 Dec 2021 22:26:33 +1000 Subject: [PATCH] Type assignment change --- src/ServerManager.Common/Model/AggregateIniValue.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/ServerManager.Common/Model/AggregateIniValue.cs b/src/ServerManager.Common/Model/AggregateIniValue.cs index 291a7faa..47c76ad8 100644 --- a/src/ServerManager.Common/Model/AggregateIniValue.cs +++ b/src/ServerManager.Common/Model/AggregateIniValue.cs @@ -171,8 +171,7 @@ namespace ServerManagerTool.Common.Model kvPropertyValue = kvPropertyValue.Substring(0, kvPropertyValue.Length - 1); } - var collection = property.GetValue(this) as IIniValuesCollection; - if (collection != null) + if (property.GetValue(this) is IIniValuesCollection collection) { var values = SplitCollectionValues(kvPropertyValue, DELIMITER); values = values.Where(v => !string.IsNullOrWhiteSpace(v)).ToArray();