Click here to Skip to main content
15,891,881 members
Articles / Programming Languages / C++

CSharpish Properties in Modern C++

Rate me:
Please Sign up or sign in to vote.
5.00/5 (10 votes)
25 Oct 2020CPOL3 min read 12.1K   12  
Simple trick to implement csharpish properties in modern C++
C# has properties that behave like class member variables and capture read and write operations. We can implement similar behavior in modern C++ in only 15 lines of code.

Views

Daily Counts

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Founder Wischner Ltd
United Kingdom United Kingdom
Writing code since 1982 and still enjoying it.

Comments and Discussions