In the early days of .Net, I believe there was an attribute you could decorate a class with to specify a default property.
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.
Still, is there another way to get the functionality it provided?
It looked something like this:
<DefaultProperty("Value")> _
Public Class GenericStat
...
Public Property Value() As Integer
...
End Property
...
End Class
This allowed you to do: Response.Write(MyObject) instead of Response.Write(MyObject.Value) ...This is not a terribly clunky example, but in some complex OO contexts it gets a little hideous. Please let me know if there is a better way.
Note: I am not looking for the Default keyword, which can only be used on properties that take a parameter.
Thanks in advance!