Hi,
Is it possible to use reflection when we write a code-template?
I was just thinking if it is possible to write a piece of code-template that will return me a list of all private field in the class separated by && operator in Visual Stuudio?
Let's say, I will enter "getAllPrivates&&" (or press a shortcut key) in the VS editor and it will return me something like this:
private bool _privateFiel1 = false;
private bool _privateFiel2 = true;
private bool _privateFiel3 = false;
private bool _privateFiel4 = false;
private bool _privateFiel5 = true;
// Here I press the shortcut or call the code-template and get his:
_privateFiel1 && _privateFiel2 && _privateFiel3 && _privateFiel4 && _privateFiel5