Only when programming, only some of the contents of the function name, want to quickly locate, but the function list of the C # editor does not search, with the regular expression search to solve this problem, and now write this process into a macro. Instructions:
Open the Macro editor of the VS, paste the following code. Specify a shortcut (optional) for this macro (optional) to enter the function name by shortcut or direct macro. Use F3 to search for the next matching function.
Sub searchFunction () Search function based on function name 'by Pharaoh 2005-4-19' http://blog.9cbs.net/pharaoh/ DIM SFIND AS STRING SFIND = INPUTBOX ("Input Function Name") DTE.Find.FindWhat = "^ [/ t] * (public | protected | private | static). *" sfind ". * / (. * $" '"^ [/ t] * (public | protected | private | static). * " sfind ". * / ([^;] * /). * $ "dte.find.target = vsfindtarget.vsfindtargetCurrentDocument DTE.Find.matchcase = false dte.find.matchWholeWord = false dte.find.backwards = False DTE.Find.matchIddenText = True DTE.Find.patternsyntax = vsfindpatternsyntax.vsfindpatternsyntaxRegexpr DTE.Find.Action = vsFindAction.vsfindActionFind DTE.Find.execute () end subfind.execute () end subfind.execute () end sub
The body of this macro uses VS record macros, and it is made in a small number of modifications. Use this method to quickly generate a macro for yourself.