Solved

VB6 to VB.NET

Posted on 2006-11-03
3
381 Views
Last Modified: 2010-04-23
When I defined a class in VB6 it automatically created the get & set methods for each field, does VB.net have the same functionality?  I can't seem to find it.
0
Comment
Question by:dgoncher
3 Comments
 
LVL 10

Accepted Solution

by:
Kinger247 earned 125 total points
ID: 17869197
Not automatically, but you create them like this  :

    Private m_thisProperty As Boolean

    Public Property thisProperty() As Boolean
        Get
            Return m_thisProperty
        End Get
        Set(ByVal value As Boolean)
            m_thisProperty = value
        End Set
    End Property
0
 

Author Comment

by:dgoncher
ID: 17869484
I see that when I add a property to the class diagram screen it creates the get set template, i was just hoping I wouldn't have to go through each field and add define a property manually.  Oh well.....carple tunnel time :)
0
 
LVL 17

Expert Comment

by:ZeonFlash
ID: 17869492
To supplement Kinger247's reply, as soon as you type "Public Property thisProperty() As Boolean" and press enter, the rest of the property methods (Get and Set) fill in automatically.
0

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question