コード例 #1
0
        public string ToString(string format, IFormatProvider formatProvider)
        {
            switch (format)
            {
            case null:
            case "N":
                return("None");

            case "F":
                return(FirstName);

            case "L":
                return(LastName);

            case "C":
                return(Country);

            case "S":
                return(Starts.ToString());

            case "W":
                return(Wins.ToString());

            case "A":
                return($"{FirstName} {LastName},{Country}; start:{Starts}, wins:{Wins}");

            default:
                throw new FormatException($"Format {format} not supproted");
            }
        }
コード例 #2
0
        public string ToString(string format, IFormatProvider formatProvider)
        {
            switch (format)
            {
            case null:
            case "N":
                return(ToString());

            case "F":
                return(FirstName);

            case "L":
                return(LastName);

            case "C":
                return(Country);

            case "S":
                return(Starts.ToString());

            case "W":
                return(Wins.ToString());

            case "A":
                return(String.Format("{0} {1}, {2}; starts: {3}, wins: {4}",
                                     FirstName, LastName, Country, Starts, Wins));

            default:
                throw new FormatException(String.Format(
                                              "Format {0} not supported", format));
            }
        }
コード例 #3
0
ファイル: Level.cs プロジェクト: Cesar18102/GameAnalytics
 public string[] GetData()
 {
     return(new string[] { Name, Starts.ToString(), Wins.ToString(), AlmostWins.ToString(), Loses.ToString(), Hardness.ToString() + "%", EmotionFactor.ToString() + "%" });
 }