How to convert lengths in C#
I'm trying to design a length conversion calculator with a combo box, so when the user selects the conversion to be performed from the combo box list and the application modifies the labels that indicate the “from” and “to” lengths accordingly.  When the user enters the “from” length and clicks the Calculate button, the program should perform the conversion and display the result in a textbox.

The application should handle the following conversions: 

    Miles to Kilometers 1 mile = 1.6093 kilometers
    Kilometers Miles 1 kilometer = 0.6214 miles
    Feet Meters 1 foot = 0.3048 meters
    Meters Feet 1 meter = 3.2808 feet
    Inches Centimeters 1 inch = 2.54 centimeters
    Centimeters Inches 1 centimeter = 0.3937 inches

The application should check the length entered by the user to make sure it is a valid decimal value.

I think I'm supposed to use a rectangular array to store the conversion information.  But I have several questions.  

How do I get labels to change based on the user selection from the combo box?  

What should I set as the text property for the combo box?  

What value type would I use for the array?  Are the conversion equations members of the array?  

Do I enter this under the calculate button or the combo box?

I'm very new to programming (obviously).  Any help would be wonderful!

Thanks!

Kali   
How to convert lengths in C#
===

I'm trying to design a length conversion calculator with a combo box, so when the user selects the conversion to be performed from the combo box list and the application modifies the labels that indicate the “from” and “to” lengths accordingly.  When the user enters the “from” length and clicks the Calculate button, the program should perform the conversion and display the result in a textbox.

The application should handle the following conversions: 

    Miles to Kilometers 1 mile = 1.6093 kilometers
    Kilometers Miles 1 kilometer = 0.6214 miles
    Feet Meters 1 foot = 0.3048 meters
    Meters Feet 1 meter = 3.2808 feet
    Inches Centimeters 1 inch = 2.54 centimeters
    Centimeters Inches 1 centimeter = 0.3937 inches

The application should check the length entered by the user to make sure it is a valid decimal value.

I think I'm supposed to use a rectangular array to store the conversion information.  But I have several questions.  

How do I get labels to change based on the user selection from the combo box?  

What should I set as the text property for the combo box?  

What value type would I use for the array?  Are the conversion equations members of the array?  

Do I enter this under the calculate button or the combo box?

I'm very new to programming (obviously).  Any help would be wonderful!

Thanks!

Kali   