<span id="mktg5"></span>

<i id="mktg5"><meter id="mktg5"></meter></i>

        <label id="mktg5"><meter id="mktg5"></meter></label>
        最新文章專題視頻專題問答1問答10問答100問答1000問答2000關鍵字專題1關鍵字專題50關鍵字專題500關鍵字專題1500TAG最新視頻文章推薦1 推薦3 推薦5 推薦7 推薦9 推薦11 推薦13 推薦15 推薦17 推薦19 推薦21 推薦23 推薦25 推薦27 推薦29 推薦31 推薦33 推薦35 推薦37視頻文章20視頻文章30視頻文章40視頻文章50視頻文章60 視頻文章70視頻文章80視頻文章90視頻文章100視頻文章120視頻文章140 視頻2關鍵字專題關鍵字專題tag2tag3文章專題文章專題2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章專題3
        問答文章1 問答文章501 問答文章1001 問答文章1501 問答文章2001 問答文章2501 問答文章3001 問答文章3501 問答文章4001 問答文章4501 問答文章5001 問答文章5501 問答文章6001 問答文章6501 問答文章7001 問答文章7501 問答文章8001 問答文章8501 問答文章9001 問答文章9501
        當前位置: 首頁 - 科技 - 知識百科 - 正文

        .net 讀取項目AssemblyInfo.cs屬性值

        來源:懂視網 責編:小采 時間:2020-11-27 22:44:20
        文檔

        .net 讀取項目AssemblyInfo.cs屬性值

        .net 讀取項目AssemblyInfo.cs屬性值:We write all those code repetitively for dynamic assembly loading and checking to verify few properties on assemblies. It would be a great stop to write all such things in the assemblyinfo.cs (because it needs to completely describe the ass
        推薦度:
        導讀.net 讀取項目AssemblyInfo.cs屬性值:We write all those code repetitively for dynamic assembly loading and checking to verify few properties on assemblies. It would be a great stop to write all such things in the assemblyinfo.cs (because it needs to completely describe the ass

        We write all those code repetitively for dynamic assembly loading and checking to verify few properties on assemblies. It would be a great stop to write all such things in the assemblyinfo.cs (because it needs to completely describe the assembly that it is intended to serve for) You can define your About form of the application entirely using the AssemblyInfo.cs
        How to use the following info:
        AssemblyInfo ainfo = new AssemblyInfo();
        frmAbout.Text = ainfo.Title;
        frmAbout.menuAbt.Text = string.Format("&About{0}..",ainfo.Title);
        frmAbout.Text = "About " + this.Owner.Text;
        frmAbout.Icon = this.Owner.Icon;
        //You can set the icon like this on the abt form.
        frmAbout.pictureBox1.Image = this.Owner.Icon.ToBitmap();
        frmAbout.lblTitle.Text = ainfo.Title;
        frmAbout.lblVersion.Text = ainfo.Version;
        frmAbout.lblCopyright.Text = ainfo.Copyright;
        frmAbout.lblDescription.Text = ainfo.Description;
        frmAbout.lblCodebase.Text = ainfo.CodeBase; 
        下面是具體的實現代碼。
        using System;
        using System.Reflection;
        using System.Runtime.CompilerServices;
        [assembly: AssemblyTitle("Demo Title")]
        [assembly: AssemblyDescription("Demo app that reads from the Assembly Info file description")]
        [assembly: AssemblyConfiguration("")]
        [assembly: AssemblyCompany("World Company")]
        [assembly: AssemblyProduct("Not for commercial use.")]
        [assembly: AssemblyCopyright("open source (US)")]
        [assembly: AssemblyTrademark("")]
        [assembly: AssemblyCulture("")]
        [assembly: CLSCompliant(true)]
        [assembly: AssemblyDelaySign(false)]
        [assembly: AssemblyKeyFile("")]
        [assembly: AssemblyKeyName("")]
        //
        // Version information for an assembly consists of the following four values:
        //
        // Major Version
        // Minor Version
        // Build Number
        // Revision
        //
        // You can specify all the values or you can default the Revision and Build Numbers
        // by using the '*' as shown below:
        [assembly: AssemblyVersion("1.0.1.1")]
        # region "Class to get the information for AboutForm"
        /* This class uses the System.Reflection.Assembly class to access assembly meta-data.
        * This class is not a normal feature of AssmblyInfo.cs */
        /// <summary>
        /// AssemblyInfo class.
        /// </summary>
        public class AssemblyInfo
        {
        //Used by functions to access information from Assembly Attributes
        /// <summary>
        /// myType.
        /// </summary>
        private Type myType;
        /// <summary>
        /// Initializes a new instance of the <see cref="AssemblyInfo"/> class.
        /// </summary>
        public AssemblyInfo()
        {
        //Shellform here denotes the actual form.
        myType = typeof(ShellForm);
        }
        /// <summary>
        /// Gets the name of the assembly.
        /// </summary>
        /// <value>The name of the assembly.</value>
        public String AssemblyName
        {
        get
        {
        return myType.Assembly.GetName().Name.ToString();
        }
        }
        /// <summary>
        /// Gets the full name of the assembly.
        /// </summary>
        /// <value>The full name of the assembly.</value>
        public String AssemblyFullName
        {
        get
        {
        return myType.Assembly.GetName().FullName.ToString();
        }
        }
        /// <summary>
        /// Gets the code base.
        /// </summary>
        /// <value>The code base.</value>
        public String CodeBase
        {
        get
        {
        return myType.Assembly.CodeBase;
        }
        }
        /// <summary>
        /// Gets the copyright.
        /// </summary>
        /// <value>The copyright.</value>
        public String Copyright
        {
        get
        {
        Type att = typeof(AssemblyCopyrightAttribute);
        object[] r = myType.Assembly.GetCustomAttributes(att, false);
        AssemblyCopyrightAttribute copyattr = (AssemblyCopyrightAttribute)r[0];
        return copyattr.Copyright;
        }
        }
        /// <summary>
        /// Gets the company.
        /// </summary>
        /// <value>The company.</value>
        public String Company
        {
        get
        {
        Type att = typeof(AssemblyCompanyAttribute);
        object[] r = myType.Assembly.GetCustomAttributes(att, false);
        AssemblyCompanyAttribute compattr = (AssemblyCompanyAttribute)r[0];
        return compattr.Company;
        }
        }
        /// <summary>
        /// Gets the description.
        /// </summary>
        /// <value>The description.</value>
        public String Description
        {
        get
        {
        Type att = typeof(AssemblyDescriptionAttribute);
        object[] r = myType.Assembly.GetCustomAttributes(att, false);
        AssemblyDescriptionAttribute descattr = (AssemblyDescriptionAttribute)r[0];
        return descattr.Description;
        }
        }
        /// <summary>
        /// Gets the product.
        /// </summary>
        /// <value>The product.</value>
        public String Product
        {
        get
        {
        Type att = typeof(AssemblyProductAttribute);
        object[] r = myType.Assembly.GetCustomAttributes(att, false);
        AssemblyProductAttribute prodattr = (AssemblyProductAttribute)r[0];
        return prodattr.Product;
        }
        }
        /// <summary>
        /// Gets the title.
        /// </summary>
        /// <value>The title.</value>
        public String Title
        {
        get
        {
        Type att = typeof(AssemblyTitleAttribute);
        object[] r = myType.Assembly.GetCustomAttributes(att, false);
        AssemblyTitleAttribute titleattr = (AssemblyTitleAttribute)r[0];
        return titleattr.Title;
        }
        }
        /// <summary>
        /// Gets the version.
        /// </summary>
        /// <value>The version.</value>
        public String Version
        {
        get
        {
        return myType.Assembly.GetName().Version.ToString();
        }
        }
        }
        # endregion

        聲明:本網頁內容旨在傳播知識,若有侵權等問題請及時與本網聯系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com

        文檔

        .net 讀取項目AssemblyInfo.cs屬性值

        .net 讀取項目AssemblyInfo.cs屬性值:We write all those code repetitively for dynamic assembly loading and checking to verify few properties on assemblies. It would be a great stop to write all such things in the assemblyinfo.cs (because it needs to completely describe the ass
        推薦度:
        標簽: 獲取 項目 net
        • 熱門焦點

        最新推薦

        猜你喜歡

        熱門推薦

        專題
        Top
        主站蜘蛛池模板: 四虎影视永久免费观看| 黄瓜视频高清在线看免费下载| 成人啪精品视频免费网站| 天天综合亚洲色在线精品| 久久久WWW免费人成精品| 免费看小12萝裸体视频国产| 亚洲国产精品精华液| 久久久久久久久久免免费精品| 免费国产精品视频| 无遮挡a级毛片免费看| 国产免费资源高清小视频在线观看| 亚洲精品蜜夜内射| 国产免费无遮挡精品视频| 国产精品亚洲一区二区在线观看| 国产精品酒店视频免费看| 久久精品国产亚洲一区二区| 亚洲jizzjizz在线播放久| 久久久久国色AV免费观看| 国产亚洲福利精品一区| 最好免费观看高清在线| 免费激情视频网站| 久久久久久久尹人综合网亚洲| 国产一二三四区乱码免费| 久久久久亚洲AV片无码| **一级一级毛片免费观看| 国产成人99久久亚洲综合精品| 一区二区三区免费在线观看| 欧洲亚洲国产清在高| 99精品在线免费观看| 亚洲国产精品午夜电影| 午夜电影免费观看| 亚洲一区二区三区四区视频| 成人免费无码大片a毛片软件 | 亚洲综合成人网在线观看| 美女啪啪网站又黄又免费| 亚洲色欲久久久综合网东京热| 久久久久国产免费| 亚洲日韩一区二区三区| 麻花传媒剧在线mv免费观看| 亚洲午夜福利在线视频| 91成人免费观看网站|