Following program is giving type status to DialogResult. I wish to know whether DialogResult is a type. Problem is highlighted.
using System;
using System.Windows.Forms;
public class HamburgerAddition
{
public static void Main()
{
string question = "Do you want fries with that?";
string caption = "Hamburger addition";
double price = 3.00;
DialogResult result = MessageBox.Show(question, caption, MessageBoxButtons.YesNo, MessageBoxIcon.Question);
if (result == DialogResult.Yes)
price += 0.75;
MessageBox.Show("Total is " + price.ToString("c"));
}
}