示例#1
0
        // Overwritten Instance Methods

        /// <summary>
        ///     Returns a <see cref="System.String" /> that represents this instance.
        /// </summary>
        public override string ToString()
        {
            if (DevelopmentalStage != DevelopmentalStage.Release)
            {
                string devStageShortcut = null;
                switch (DevelopmentalStage)
                {
                case DevelopmentalStage.Alpha:
                    devStageShortcut = "a";
                    break;

                case DevelopmentalStage.Beta:
                    devStageShortcut = "b";
                    break;

                case DevelopmentalStage.ReleaseCandidate:
                    devStageShortcut = "rc";
                    break;
                }
                return(String.Format("{0}.{1}.{2}.{3}{4}{5}", Major, Minor, Build, Revision, devStageShortcut
                                     , DevelopmentBuild != 0 ? DevelopmentBuild.ToString(CultureInfo.InvariantCulture) : String.Empty));
            }
            return(BasicVersion);
        }
示例#2
0
        // Overwritten Instance Methods

        /// <summary>
        ///     Returns a <see cref="System.String" /> that represents this instance.
        /// </summary>
        public override string ToString()
        {
            if (DevelopmentalStage != DevelopmentalStage.Release)
            {
                string devStageShortcut = null;
                switch (DevelopmentalStage)
                {
                case DevelopmentalStage.Alpha:
                    devStageShortcut = "a";
                    break;

                case DevelopmentalStage.Beta:
                    devStageShortcut = "b";
                    break;

                case DevelopmentalStage.ReleaseCandidate:
                    devStageShortcut = "rc";
                    break;
                }
                return
                    ($"{Major}.{Minor}.{Build}.{Revision}{devStageShortcut}{(DevelopmentBuild != 0 ? DevelopmentBuild.ToString(CultureInfo.InvariantCulture) : string.Empty)}");
            }
            return(BasicVersion);
        }