Yes, indeed, this is a version of Microsoft C ++ managed code or C ++ / CLI. Now you not only need to write Get and Set Methods, but you also need to define it as a property. I will say just as I hate adding the extra letters "Read only" and "Write only", the properties of this property are pretty neat.
But superfluous in unmanaged C ++ !!!
For example, you can write in a class (will do the same!):
std::string GetLastName() const { return lastname;} void SetLastName(std::string lName) { lastname = lName;}
"const" made sure that "GET" was just read and the set was clear. No need to define a property or add confusion to String ^ vs. std :: string ....
source share