コード例 #1
0
        public override string ToString()
        {
            string result;

            result = $"H{heat}L{Lane}  time: ";
            if (TimeSwam.ToString() != "00:00:00")
            {
                result += TimeSwam.ToString().Substring(3, 8);
            }
            else
            {
                result += "no time";
            }
            return(result);
        }
コード例 #2
0
 public string GetInfo()
 {
     if (TimeSwam == new TimeSpan())
     {
         return(String.Format("H" + NumberOfTheHeat + "L" + NumberOfLane + "\t" + "Time: no Time"));
     }
     else
     {
         return(String.Format("H" + NumberOfTheHeat + "L" + NumberOfLane + "\t" + "Time: " + TimeSwam.ToString(@"mm\:ss\.ff")));
     }
 }