修改C#生成的方法存根-Intellisense(特别是EventHandlers) [英] Modify C# Generated method stub -- Intellisense (EventHandlers specifically)

查看:80
本文介绍了修改C#生成的方法存根-Intellisense(特别是EventHandlers)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我将eventHandler添加到控件中时,智能提示就很好了,并且(可选)生成了一个方法存根.我不喜欢提供的方法存根,并且想要更改它.如果您很好奇,我希望它是private void而不是[Default] void.

请让我知道如何修改由intellisense生成的生成的方法存根.

When I add an eventHandler to a control, the intellisense comes up just fine, and (optionally) produces a method stub. I don''t like the provided method stub, and would like to change it. If you''re curious, I would like it to be private void rather than [Default] void.

Please let me know how to modify the generated method stub produced by intellisense.

推荐答案

您需要编辑MethodStub.snippet文件.

在我的VS C#Express 2005上,该文件位于

C:\Program Files\Microsoft Visual Studio 8\VC#\Snippets\1033\Refactoring

带下划线的部分显示了

You need to edit the MethodStub.snippet file.

On my VS C# Express 2005 this is located at

C:\Program Files\Microsoft Visual Studio 8\VC#\Snippets\1033\Refactoring

The addition is shown underlined

                <![CDATA[private


签名


{


这篇关于修改C#生成的方法存根-Intellisense(特别是EventHandlers)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆