![]() |
1
3
尝试以下代码行
相对回答: How to put the build date of application somewhere in the application? |
![]() |
2
1
回答一般问题:不,除了对数字类型和字符串连接进行简单的算术运算外,没有任何方法可以让C编译器在编译时执行任何工作。您不能让它嵌入当前日期。 但是,对于这个特定的目的,您可以在Jeff Atwood的博客帖子中使用“第三种方式”: http://www.codinghorror.com/blog/2005/04/determining-build-date-the-hard-way.html |
![]() |
3
1
最简单的方法是从.exe或.dll本身检查文件日期/时间:
|
![]() |
4
0
如何编译解决方案?
|
![]() |
5
0
您可以制作一个工具,它在构建时被调用,并将当前时间作为常量插入到类似assemblyinfo.cs的代码文件中。 另一种方法是从可执行文件读取文件修改时间。 |
|
Robert King · Unity C#语法问题-转换位置 1 年前 |
![]() |
JBryanB · 如何从基本抽象类访问类属性 1 年前 |
|
law · 检查答案按钮的输入字符串格式不正确 2 年前 |
![]() |
i_sniff_ket · 在unity之外使用unity类 2 年前 |