title: VB.net: Setting "NULL" to a property by condition?
body: <p>Why below code has error in VB.net 2008?</p>
  
  <pre><code>Dim Object1 As New Class1
  
  Object1.SetId = If(rbSet.Checked = True, Convert.ToInt32(txtSetId.Text.Trim()), DBNull.Value)
  </code></pre>
  
  <p>What I'm trying is to set a property of an object by a condition.</p>