Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- namespace Variablecasting
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- private void button1_Click(object sender, EventArgs e)
- {
- int intTal = 5;
- float floatTal = 5.5F;
- double doubleTal = 6.7;
- string stringTal = "55";
- doubleTal = floatTal;
- floatTal = (float) doubleTal;
- intTal = (int) doubleTal;
- }
- private void button2_Click(object sender, EventArgs e)
- {
- int alder = int.Parse(textBox1.Text);
- alder = alder + 1;
- label1.Text = alder.ToString();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment