L
Levon Levonian
Hello All,
there was much talk about the fact that .NET doesn't support default
properties for objects, meaning that if in VB6 i could have Textbox1 =
"hello", in .NET i can do it only by refering explicitly to the property
Textbox1.Text = "hello".
why then some objects like DataRow still have default properties?
dr.Item("ID")
and
dr("ID")
both work fine and serve the same purpose
and of course, my quesion is how to create a default property for my own
classes? is it by including the Item property when i design my classes? or
is there some other tricks?
thank you,
Levon
there was much talk about the fact that .NET doesn't support default
properties for objects, meaning that if in VB6 i could have Textbox1 =
"hello", in .NET i can do it only by refering explicitly to the property
Textbox1.Text = "hello".
why then some objects like DataRow still have default properties?
dr.Item("ID")
and
dr("ID")
both work fine and serve the same purpose
and of course, my quesion is how to create a default property for my own
classes? is it by including the Item property when i design my classes? or
is there some other tricks?
thank you,
Levon