Write get and set method for database
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
ArshadRank #2,492 · 564 reputationPosted Jul 3, 2009, 3:15 PM EDT
so you just start added the Variable as per the Data Base Column and Just assign the Property that's all, or else if you are using the C# then just write click on those variable and select the Refactor and then Encapsulate Field option or else
just find below
private string str;
public string Str
{
get { return str; }
set { str = value; }
}
Thats all you do for all the DataBase Column.
Regards
Arshad Khan.