<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
        主站蜘蛛池模板: 亚洲国产精品精华液| 亚洲精品高清国产一久久| 亚洲日产乱码一二三区别| 95免费观看体验区视频| 亚洲精品私拍国产福利在线| 在线看片免费人成视频久网下载 | 一级黄色免费毛片| 免费人成网站在线播放| 无忧传媒视频免费观看入口| 亚洲日韩国产一区二区三区| 中文字幕手机在线免费看电影| 亚洲成AV人片在线观看ww| 日韩中文字幕免费视频| 亚洲一级在线观看| 国产免费观看青青草原网站| 无码人妻一区二区三区免费视频 | 日韩午夜理论免费TV影院| 亚洲一卡2卡3卡4卡国产网站| 24小时免费直播在线观看| 亚洲av午夜国产精品无码中文字 | 四虎免费在线观看| 四虎精品成人免费视频| 亚洲AV无码乱码国产麻豆| 久久亚洲精品中文字幕三区| 久久永久免费人妻精品| 亚洲a级片在线观看| 免费永久在线观看黄网站| 国产一精品一av一免费爽爽| 亚洲国产日韩在线成人蜜芽 | 亚洲自偷自偷偷色无码中文| 一级毛片免费播放| 国产午夜亚洲精品不卡电影| 亚洲中文字幕日产乱码高清app| 国产男女爽爽爽爽爽免费视频| 国产亚洲视频在线| 亚洲成人激情在线| 亚洲成a人片在线观看国产| 亚洲精品视频在线免费| 手机永久免费的AV在线电影网| 亚洲视频免费在线看| 亚洲 另类 无码 在线|