Answer to Question #5040 in C# for Rabbia

Question #5040
What should i do if i want to add 10 years to the present date and display it in a textbox2 where i have present date in textbox1. pls Reply.
Thnx in advance!!
1
Expert's answer
2011-11-08T11:38:01-0500
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 WindowsFormsApplication5
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void button1_Click(object sender, EventArgs e)
{
textBox2.Text = (int.Parse(textBox1.Text)+10).ToString();
}
}
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS