Hi all![]()
See the class I know that my constructor are wrong but how to use the same constructor for setting different value.
I do not want to use the class property!
C# Code:
class Test { private string _CatID; private string _CatName; private string _SubCatName; private string _SubCatMotherName; public Test(string CatID, string CatName) { _CatID = CatID; _CatName = CatName; } public Test(string CatID, string SubCatName) { _CatID = CatID; _SubCatName = SubCatName; } public Test(string CatID, string SubCatMotherName) { _CatID = CatID; _SubCatMotherName = SubCatMotherName; } }
How to set value through constructor without using the property I have some more variable , above was just little example




Reply With Quote