RE:calcular edad con
Publicado por
Benito (1 intervención) el 28/06/2010 16:15:34
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace WindowsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
txtTiempo.Text = DateTime.Now.ToString();
TxtDia.Text=DateTime.Now.Day.ToString();
TxtMes.Text = DateTime.Now.Month.ToString();
TxtAño.Text = DateTime.Now.Year.ToString();
}
private void BtnCalcular_Click(object sender, EventArgs e)
{
this.TxtDiase.Text = (int.Parse(TxtDia.Text) - int.Parse(y.Text)).ToString();
this.Txtañosed.Text = ((int.Parse(TxtAño.Text) - int.Parse(j.Text))-1).ToString();
this.Txtmese.Text = TxtMes.Text.ToString();
}
}