title: Default properties in VB.NET?
body: <p>In the early days of .NET, I <i>believe</i> there was an attribute you could decorate a class with to specify a default property.</p>
  
  <p>According to some articles I've found, this appears to have been yanked from the framework at some point, because it was a little confusing, and I can see how that is the case. </p>
  
  <p>Still, is there another way to get the functionality it provided?</p>
  
  <p>It looked something like this:</p>
  
  <pre><code>&lt;DefaultProperty("Value")&gt; _  
  Public Class GenericStat
      ...
      Public Property Value() As Integer
          ...
      End Property
      ...
  End Class
  </code></pre>
  
  <p>This allowed you to do <code>Response.Write(MyObject)</code> instead of <code>Response.Write(MyObject.Value)</code>...  This is not a terribly clunky example, but in some complex object-oriented contexts it gets a little hideous. Please let me know if there is a better way. </p>
  
  <p><b>Note:</b> I am not looking for the Default keyword, which can only be used on properties that take a parameter.</p>