我可以在 Visual Studio 中创建区域化方法的键盘快捷方式并使用 GhostDoc 自动记录它吗?
由此:
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
}
我想做这个:
#region protected override void OnInit(EventArgs e)
/// <summary>
/// Raises the <see cref="E:Init"/> event.
/// </summary>
/// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
}
#endregion
最佳答案
我不确定 GhostDoc 自动文档,但要对所选文本进行区域划分,您可以使用 Visual Studio 中的“环绕”功能。
选择一部分代码并按 Ctrl + K、S。这会调出“环绕”上下文菜单。在菜单中选择“地区”,输入您的地区名称,一切就绪。
这个函数也可以用于一堆其他的东西。 if、for、while 和 try 语句等等。
关于visual-studio - 创建区域方法的键盘快捷键,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1378606/