[英]Is there any shortcut to add current DateTime stamp snippet to c# file in Visual studio
这可能是愚蠢的,但我在记事本中寻找像F5这样的快捷方式来添加日期时间戳,用于c#文件中的简单摘要任务,例如
/// <summary>
/// Created By: Developer Name
/// Created On: 12:08 PM 10/28/2013
/// Pass HTML SELECT control and IsFirstOptionToRemove (optional) to find all its values and displayed text
/// </summary>
/// <param name="selectControl"></param>
/// <param name="IsFirstOptionToRemove"></param>
/// <returns>retruns dictionary containing key value pairs of select control options. </returns>
我不希望所有这些行作为代码片段,但我可以在我的代码段中有当前日期时间戳。 我没有找到一种动态修改自定义代码段的方法。
这里描述了一个基于宏的解决方案:
基本上,你创建一个像这样的宏:
Sub CommentInitialsDate()
DTE.ActiveDocument.Selection.Text = "// [INSERT MY INITIALS HERE] " & Format(Date.Today, "yyyy-MM-dd") & " - "
End Sub
然后分配快捷键。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.