0

像 IntelliJ IDEA 这样在 Visual Studio 中创建 *.cs 文件时,是否可以添加创建日期和用户名?

例如:

//Created by Tamerlan, 9.28.2016 11:00  <- add this line automatically
public class MyNewClass
{
}
4

1 回答 1

0

是的,您可以为 C# 类创建项目模板并使用参数替换。用户名、日期和时间可用作预定义的替换。

https://msdn.microsoft.com/en-us/library/eehb4faa(v=vs.140).aspx

尽管可能,但源代码控制使这变得多余。在我看来。

于 2016-09-29T07:12:51.603 回答