mardi 17 décembre 2019

C# Class Design [duplicate]

This question is an exact duplicate of:

I am creating a New Class for a New Customer Type "NUO" Customer NUOCustomer with the properties CustCode WareHouseAddess StoreAddress ............................. Methods public SetCustCode(string valuein) public SetWareHouseAddress(string valuein) public SetStoreAddress(string valuein)

OR should I have NO Properties and just methods ?

Methods public string GetCustCode(string valuein) public string GetHouseAddress(string valuein) public string GetStoreAddress(string valuein)

Which of the above approaches is better and is the naming o.k ? Set and Get I am not sure about these ?

Aucun commentaire:

Enregistrer un commentaire