From 083aa6df83d6076e998c5f37ebb661e9ab4e2230 Mon Sep 17 00:00:00 2001 From: James Newton-King Date: Sun, 18 Aug 2019 18:45:02 +1200 Subject: [PATCH] Clean up --- Src/Newtonsoft.Json/Linq/JObject.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Src/Newtonsoft.Json/Linq/JObject.cs b/Src/Newtonsoft.Json/Linq/JObject.cs index 34cd887e..3b2ba8a6 100644 --- a/Src/Newtonsoft.Json/Linq/JObject.cs +++ b/Src/Newtonsoft.Json/Linq/JObject.cs @@ -744,16 +744,15 @@ namespace Newtonsoft.Json.Linq PropertyDescriptorCollection ICustomTypeDescriptor.GetProperties(Attribute[] attributes) { - var propertiesArray = new PropertyDescriptor[Count]; - var i = 0; + PropertyDescriptor[] propertiesArray = new PropertyDescriptor[Count]; + int i = 0; foreach (KeyValuePair propertyValue in this) { propertiesArray[i] = new JPropertyDescriptor(propertyValue.Key); i++; } - var descriptors = new PropertyDescriptorCollection(propertiesArray); - return descriptors; + return new PropertyDescriptorCollection(propertiesArray); } AttributeCollection ICustomTypeDescriptor.GetAttributes()