Tryin to finish some C# tutorial examples, I write VB and some procedural proprietary languages at work and must learn C#.
I am having trouble with OOP and syntax: Why does the writeline command return no values? My struct contains the method and variables I want passed to the Main Method.
Output should be min from midnight.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace TestTime
{
class Program
{
public struct Time
{
private readonly int minutes;
public Time(int hh, int mm)
{
this.minutes = 60 * hh + mm;
}
public override String ToString()
{
return minutes.ToString();
}
}
public void WriteTime()
{
Console.WriteLine("Time= ", );
}
static void Main(string[] args)
{
Time time = new Time(9, 30);
Console.WriteLine("Time= ", time);
Console.WriteLine("Press Any Key");
Console.ReadKey();
}
}
}