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.