[英]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.