文件名称:C#应用程序判断是否闰年
文件大小:33KB
文件格式:RAR
更新时间:2014-05-04 03:32:33
C#应用程序
C#应用程序判断是否闰年 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 btOk_Click(object sender, EventArgs e) { btOk.ForeColor = Color.Red; int year=int.Parse(txtYear.Text); if (year % 4 == 0 && year % 100 != 0 || year % 400 == 0) { lbSee.Text="您输入的是闰年!"; } else { lbSee.Text="您输入的不是闰年!"; } } private void btClear_Click(object sender, EventArgs e) { btClear.ForeColor = Color.Blue; txtYear.Text = ""; lbSee.Text = ""; txtYear.Focus(); } } }
【文件预览】:
判断是否闰年
----WindowsApplication1()
--------Form1.cs(1KB)
--------bin()
--------obj()
--------Properties()
--------Program.cs(478B)
--------Form1.Designer.cs(4KB)
--------WindowsApplication1.csproj(3KB)
--------Form1.resx(6KB)
----WindowsApplication1.suo(13KB)
----WindowsApplication1.sln(946B)