Unfortunately, this only works on what you are doing, but it still needs to be kept in mind if you use a lot of your own libraries.
One thing I have done for any libraries I do is try to trick intellisense C # define. In the class declaration in the header file for any library that I create, I surround the entire private part in #ifdef space, for example
#ifdef MYCLASS_SHOW_PRIVATE_VARIABLES private: int hideThisVariable; float noShow; void HiddenIncrementFunction(); #endif
Then in the class code section, where I need to provide definitions for all methods, at the top, before I include the class declaration file, I add
#define MYCLASS_SHOW_PRIVATE_VARIABLES
Thus, private members are visible only to those methods that you implement for your class in the source file. Any clients using this library will not be able to see private variables through intellisense, unless, of course, they can determine your processor directive.
Nkosi dean
source share