C# Temperature converter from listbox and display result in other listbox
-
i want to create windows form application that user can type in celsius(10value) temperature in listbox (celsiuslistbox) using textbox and converter button will converter all 10 value in the celsius listbox and display results in fahrenheit listbox . this what i wrote so far: double temp_celsius ;// to hold celsius temperature double temp_fahrenheit ,/7 toe hold fahrenheit temperature converter button code celsiuslistbox.items.add(textbox);// value of celsius temp_celsius = celsiuslistbox.items.add(temp_celsius)// value of celsius displays in celsiuslistbox temp_fahrenheit= (9.0/5.0)*temp_celsius+32; fahrenheitlistbox.items.add(temp_fahrenheit) my questions : i know there are som mistakes in my code , it is hard for me to find how can i converts all value in celsius listbox into fahrenheit ? 10 value of celsius is in the listbox written by the user . should i use for loop to perform conversion .?
-
i want to create windows form application that user can type in celsius(10value) temperature in listbox (celsiuslistbox) using textbox and converter button will converter all 10 value in the celsius listbox and display results in fahrenheit listbox . this what i wrote so far: double temp_celsius ;// to hold celsius temperature double temp_fahrenheit ,/7 toe hold fahrenheit temperature converter button code celsiuslistbox.items.add(textbox);// value of celsius temp_celsius = celsiuslistbox.items.add(temp_celsius)// value of celsius displays in celsiuslistbox temp_fahrenheit= (9.0/5.0)*temp_celsius+32; fahrenheitlistbox.items.add(temp_fahrenheit) my questions : i know there are som mistakes in my code , it is hard for me to find how can i converts all value in celsius listbox into fahrenheit ? 10 value of celsius is in the listbox written by the user . should i use for loop to perform conversion .?