开发者

class name using reflection in a VS2010 macro

开发者 https://www.devze.com 2023-02-26 05:02 出处:网络
I have a VS2010 macro that inserts bolierplate header text at top of each class. Running the macro inserts module name, developer, description, etc. as expected.

I have a VS2010 macro that inserts bolierplate header text at top of each class. Running the macro inserts module name, developer, description, etc. as expected.

Instead of typing开发者_如何学运维 the module name, i would like to insert the name into the text. How do I get the class (or form name) name when I run the macro in the selected code page?

I have looked at reflection, but not sure how to get the form/class name my cursor is on for the macro execution

0

精彩评论

暂无评论...
验证码 换一张
取 消