Automating Property in classes

  • Thread starter Thread starter Ivan Weiss
  • Start date Start date
I

Ivan Weiss

I am creating an object that has quite a few data members and need to
create properties for each of them (using get/set). Can VB.Net do this
automatically or do I have to type in all of the property functions?

-Ivan
 
* Ivan Weiss said:
I am creating an object that has quite a few data members and need to
create properties for each of them (using get/set). Can VB.Net do this
automatically or do I have to type in all of the property functions?

You will have to do that by hand. If you have turned on VB.NET's
autocomplete feature, the body of the property will be generated
automatically.
 
Wow with all of Microsoft's sophisticated tools I figured they could
have at least filled in portions of those properties. That is weak on
Microsofts point.

-Ivan
 
Ivan,
In addition to Herfried's comments, depending on the nature of the data
members, you could probably write a macro to create the properties rather
quickly. Then assign the macro to a toolbar button. Select the data member,
hit the button, bam! property created.

Remember the macro language in VS.NET is VB.NET ;-)

Hope this helps
Jay
 
Back
Top