title: C# Get properties from SettingsPropertyCollection
body: <p>I have profile provider in my web.config</p>
  
  <pre><code>    &lt;profile defaultProvider="MyProvider"&gt;
        &lt;providers&gt;
  .......
        &lt;properties&gt;
          &lt;add name="CustomField1" type="string" /&gt;
          &lt;add name="CustomField2" type="string" /&gt;
          &lt;add name="CustomField3" type="string" /&gt;
          &lt;add name="CustomField4" type="string" /&gt;
        &lt;/properties&gt;
      &lt;/profile&gt;
  </code></pre>
  
  <p>How can I get string[] array containing all avaliable properties (CustomField1, CustomField2....)</p>
  
  <p><strong>Edit:</strong>
  Found working solution but not sure if it's the best and easiest one.</p>
  
  <pre><code>var allCustomProperties =
                      profile.GetType().GetProperties().Where(l =&gt; l.PropertyType.Name == "String" &amp;&amp; l.CanWrite == true).Select(
                          l =&gt; l.Name).ToArray();
  </code></pre>