Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 C# 中添加事件处理程序方法非常容易。您只需键入“object.event +=”,然后按两次 Tab。
VB项目有这样的东西吗?
注意:这适用于动态创建的控件或未声明 WithEvents 的控件。
您可以在编码窗口顶部选择对象和事件,VB 将自动创建处理事件的方法并将其连接到设计器文件中。除此之外,Visual Studio 和 Resharper 都没有这样的功能。
C# 开发团队添加了对此的支持,但出于某种原因,VB 人员还没有开始使用它,我也没有看到任何第三方插件做类似的事情。