public static void Main()
TimeSpan ts = TimeSpan.FromMinutes(5);
PropertyInfo ticksProperty = typeof(TimeSpan).GetProperty(nameof(TimeSpan.Ticks));
MethodInfo getTicksMethod = ticksProperty.GetGetMethod(false);
Console.WriteLine(getTicksMethod.Invoke(ts, Array.Empty<object>()));
Func<TimeSpan, Int64> getTicks = (Func<TimeSpan, Int64>)Delegate.CreateDelegate(typeof(Func<TimeSpan, Int64>), getTicksMethod, true);
Console.WriteLine(getTicks(ts));