title: How can i convert the C# code listed below into VB
body: <p>i am using the Json.net to serialize an object. the specific object is eventInstance.Properties which is the properties of a windows event log.</p>
  
  <p>i am  getting a </p>
  
  <pre><code>Newtonsoft.Json.JsonSerializationException: Self referencing loop detected for property 
  </code></pre>
  
  <p>for C# an example is shown here</p>
  
  <pre><code>string json = JsonConvert.SerializeObject(joe, Formatting.Indented, new JsonSerializerSettings
   {
       ReferenceLoopHandling = ReferenceLoopHandling.Ignore
   });
  </code></pre>
  
  <p>my line of code is below but i am not sure how to make it work in VB or if it is even possible</p>
  
  <pre><code>command.Parameters.AddWithValue("@f18", JsonConvert.SerializeObject(eventInstance.Properties(), New JsonSerializerSettings() {ReferenceLoopHandling = ReferenceLoopHandling.Ignore}))
  </code></pre>
  
  <p>i get an error that states 'ReferenceLoopHandling' is an enum type and cannot be used as an expression</p>
  
  <p>thanks for the help</p>