C# Corner
Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Convert Temperature in C#
WhatsApp
iqra shahzad
12y
12.6
k
0
1
25
Blog
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)
{
}
}
}
People also reading
Membership not found