If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register or Login
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Modfifying ToString() and Passing values from struct to Main Method()

In the following code, I am trying to change it to declare a read-only property Hour returning the number of hours and a read-only property Minute returning the number of minutes. For instance, new Time(23, 45).Minute should be 45. I need to modify the ToString() method so that it shows a Time in the format hh:mm, for instance 10:05, instead of 605. How can I use String.Format to do the formatting in the Main() Method?

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Timers;
namespace TestTime
{
class Program
{
static void Main(string[] args)
{