[英]How to get the details of another file info using getter & setter methods in c#?
static string sm_strVersion;
a = Assembly.GetEntryAssembly();
sm_strVersion = "Version:" + a.GetName().Version;
//version.cs file contains below code:
namespace FInclude
{
public partial class CFontData
{
public readonly string ToolVersion = "FL.001";
}
}
有人可以解釋Assembly.GetEntryAssembly()
嗎?
在哪里可以獲取有關C#中所有內置函數的文檔?
Assembly.GetEntryAssembly()
返回Assembly
類型的對象。 所有可用的方法和屬性都可以在System.Reflection.Assembly
類文檔中找到 。
正如Dennis所說, Assembly.GetEntryAssembly() returns an object of type Assembly
,並且此Assembly包含'Main'
方法(這是入口點)。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.