How do I show minutes and seconds using string interpolation in C#?
Viewed 114 times.
-
Example
Copy code to clipboardvar time = new TimeSpan(0, 4, 34); TimeTextBlock.Text = $"Time: {time:m\\:ss}";
Output
Time: 4:34
Link to documentation or other source
24 Jul 2019
Author: Loek van den Ouweland
Would you recommend this example to your colleagues?