Add Code to a specific function of an existing class

Apr 17, 2012 at 7:11 AM

Add-ClassMember & Add-ClassMemberViaTemplate commands are used to add code to the end of an existing class. But i want to add some code at the end of an specific function of the class.

The parameter "Position" in "Add-ClassMember" command is used for what? Try to provide an example.

Please help.

Jan 28, 2013 at 10:27 AM

Documentation: "The position in the class where the source code should be added. See documentation for EnvDTE.CodeModel.AddVariable for allowed values. If the position is not specified, the new member will be added to the end of the class." (File EnvDTEExtensions.cs)