TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Convert Temperature in C#
iqra shahzad
Dec 31, 2012
12.5
k
0
1
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
Windows programme to convert temperature in C#.
tempreture.rar
Windows programme to convert temperature in C#.
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 tempreture
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
double val1;
double val2;
private void textBox1_TextChanged(object sender, EventArgs e)
{
double val1;
val1 = double.Parse(textBox1.Text);
}
private double farhen()
{
double farenhiet;
farenhiet = (val1 * 9 / 5) + 32;
return farenhiet;
}
private void button1_Click(object sender, EventArgs e)
{
textBox2 = farhen(val2).ToString();
}
private void textBox3_TextChanged(object sender, EventArgs e)
{
double val2;
val2 = double.Parse(textBox1.Text);
}
private void button2_Click(object sender, EventArgs e)
{
textBox2 = farhen(val2).ToString();
}
private double cels()
{
double cels;
cels= (val2-32) * 5/ 9 ;
return cels;
}
private void Form1_Load(object sender, EventArgs e)
{
}
}
}
Next Recommended Reading
Pass Data Using WebAPI In C# Windows Forms