i am trying to solve that assignment and this is what i have so far
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace CarInsurance
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
int driverAge;
String stRes = "WI";
const int BASEIL = 100;
const int BASEWI = 50;
try
{
driverAge = Convert.ToInt32(textBox1);
stRes = Convert.ToString(textBox2);
if (driverAge < 16 && driverAge > 80 || stRes != "WI" && stRes != "IL" )
driverAge = (3*100) - driverAge;
}
catch (ArgumentException)
{
label3.Text = " ";
}
try
{
if(driverAge != "" )
}
catch(FormatException)
{
label3.Text = "Error":
}
}
private void button1_Click(object sender, EventArgs e)
{
}
}
}