i haven programmed in a while so i forgot something.
ive got a "Kunde" class. with some variables:
class Kunde
{
private string _navn;
private string _adresse;
private int _postnr;
private string _by;
private int _telefonnr;
private int _mobil;
private string _email;
private string _land;
private string _oplysning;
private int _kundenr;
//Erhverv:
private int _cvr;
private string _firmanavn;
private string _kontaktperson;
//Tom konstruktør
public Kunde()
{
}
//privat
public Kunde(string navn, string adresse, int postnr, string by, int telefonnr, int mobil, string email, string land, string oplysning, int kundenr)
{
_navn = navn;
_adresse = adresse;
_postnr = postnr;
_by = by;
_telefonnr = telefonnr;
_mobil = mobil;
_email = email;
_land = land;
_oplysning = oplysning;
_kundenr = kundenr;
}
}
}
my question is.. ive got a winform with some text fields, but not every field has to be filled with data..
should a make a get/set on every variable to be able to set the variable from another class - or a constructor for each option?
whats the best way to do this?