• Winform 版本信息


    #region Assembly Attribute Accessors

    public string AssemblyTitle
    {
    get
    {
    object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyTitleAttribute), false);
    if (attributes.Length > 0)
    {
    AssemblyTitleAttribute titleAttribute
    = (AssemblyTitleAttribute)attributes[0];
    if (titleAttribute.Title != "")
    {
    return titleAttribute.Title;
    }
    }
    return System.IO.Path.GetFileNameWithoutExtension(Assembly.GetExecutingAssembly().CodeBase);
    }
    }

    public string AssemblyVersion
    {
    get
    {
    return Assembly.GetExecutingAssembly().GetName().Version.ToString();
    }
    }

    public string AssemblyDescription
    {
    get
    {
    object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyDescriptionAttribute), false);
    if (attributes.Length == 0)
    {
    return "";
    }
    return ((AssemblyDescriptionAttribute)attributes[0]).Description;
    }
    }

    public string AssemblyProduct
    {
    get
    {
    object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyProductAttribute), false);
    if (attributes.Length == 0)
    {
    return "";
    }
    return ((AssemblyProductAttribute)attributes[0]).Product;
    }
    }

    public string AssemblyCopyright
    {
    get
    {
    object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false);
    if (attributes.Length == 0)
    {
    return "";
    }
    return ((AssemblyCopyrightAttribute)attributes[0]).Copyright;
    }
    }

    public string AssemblyCompany
    {
    get
    {
    object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCompanyAttribute), false);
    if (attributes.Length == 0)
    {
    return "";
    }
    return ((AssemblyCompanyAttribute)attributes[0]).Company;
    }
    }
    #endregion
  • 相关阅读:
    animation-fill-mode
    css3 media queries
    三列,左右两列宽度固定,中间宽度自适应
    两列布局,一列定宽,一列宽度自适应
    css3 animation
    transition和animation区别
    transform 和 transition
    弹出框样式
    python map和filter函数
    leetcode Z字形字符串
  • 原文地址:https://www.cnblogs.com/litsword/p/2153451.html
Copyright © 2020-2023  润新知