Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Convert Temperature in C#
WhatsApp
iqra shahzad
12y
12.5
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)
{
}
}
}
Up Next
Pass Data Using WebAPI In C# Windows Forms
Ebook Download
View all
GitHub Copilot - Coding with Copilot
Read by 2.7k people
Download Now!
Learn
View all
Membership not found