using System;
//csc operator_question_2.cs
//also deals with DateTime also
namespace question_operator
{
public class question
{
public static void Display(DateTime? showtime, string title)
{
// If a value is defined for the showtime argument, display its value; otherwise,
// display that no value is defined.
Console.Write(title);
if (showtime.HasValue == true)
{Console.WriteLine("The date and time is "+ showtime.Value);}
else
{Console.WriteLine("The date and time is not defined."); }
}
public static void renew( )
{
DateTime today = DateTime.Now;
TimeSpan duration = new TimeSpan(36, 0, 0, 0);
DateTime answer = today.Add(duration);
//System.Console.WriteLine("+" + answer );
Console.WriteLine( "from " + today + " to " + answer + " Extended" );

}
class test
{
public static void Main()
{
DateTime? myNow;
// Assign the current date and time to myNow then display its value.
myNow = DateTime.Now;
question.Display(myNow, "When Not Null : ");

// Assign null (Nothing in Visual Basic) to myNow then display its value.
myNow = null;
question.Display(myNow, "Hello : ");
//

Console.WriteLine( "Do you wnat to renew your books, yes/no ");
string s = Console.ReadLine();
if( s=="yes") { question.renew(); }
// Display the date and time.
Console.ReadLine();
}
}
}
}