Vb.net : Get Set properties with different forms -


i have class , set properties

public property username() string             return _username     end     set(byval value string)         _username = value     end set end property 

i want set value in 1 form , same value in form how do this?

simply declare property on 1 form, when instantiate can set before showing or while doing other action:

dim newform form2 = new form2() newform.username = "alejandro" newform.show() 

this assumes property username declared on form2 public. it's possible other way around, or add piece of data constructor parameter , keep property private.


Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)

Google AdWords and AdSense - A Dynamic Small Business Marketing Duo