示例#1
0
        public override string ToString()
        {
            var s = "v" + Version.ToString(2);

            if (ServicePack != 0)
            {
                s += " Service Pack " + ServicePack.ToString();
            }
            if (Variant != FrameworkVariant.Default)
            {
                s += " " + Variant.ToString();
            }
            return(s);
        }
        /// <summary>
        /// Gets the service pack version as a string in the simplest format
        /// </summary>
        /// <returns></returns>
        private string GetServicePackVersionString()
        {
            if (ServicePack != null)
            {
                if (ServicePack.Minor != 0)
                {
                    return(ServicePack.ToString(2));
                }
                else
                {
                    return(ServicePack.ToString(1));
                }
            }

            return(null);
        }