TimeSpan? TestTime { get; }
public class Some1 : ISome1
public string TestTime { get; set; }
TimeSpan? ISome1.TestTime
get { return this.Parse(this.TestTime); }
private TimeSpan? Parse(string text)
string[] values = text.Split(':');
return new TimeSpan(0, 0, int.Parse(values[0]), int.Parse(values[1]));
return new TimeSpan(0, int.Parse(values[0]), int.Parse(values[1]), int.Parse(values[2]));
throw new FormatException("Unsupported format of TimeSpan.");
public interface ISome2 : ISome1
string Additional { get; }
public class Some2 : Some1, ISome2
public string Additional { get; set; }
public static void Main()
ISome1 some2 = new Some2() { TestTime = "00:02:00" };
Console.WriteLine(some2.TestTime?.Days);