private void myClicked(object sender, EventArgs e) { MessageBox.Show("뷁뷁"); } private void pushButton_Click(object sender, EventArgs e) { DateTime d1 = dateTimePicker1.Value; DateTime d2 = dateTimePicker2.Value; MessageBox.Show(d2.Year - d1.Year +"세입니다"); }