Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Studio
  4. C# Temperature converter from listbox and display result in other listbox

C# Temperature converter from listbox and display result in other listbox

Scheduled Pinned Locked Moved Visual Studio
questioncsharp
2 Posts 2 Posters 10 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    User 13707640
    wrote on last edited by
    #1

    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 .?

    L 1 Reply Last reply
    0
    • U User 13707640

      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 .?

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      This has nothing to do with Visual Studio, and you already posted the question in the C# forum. Please post in one forum only.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups