How to clear Textbox value is easy. You can do it many different ways.
TextBox1.Text = "";
OR
TextBox1.Text = string.empty;
OR
TextBox1.Text = null;
The .NET Framework allows developers to use the same set of skills to rapidly buid great applications for the web, windows, services and more.
Check if the Year is Leap Year or Not in C#
How to check if the Year is Leap Year or Not? Using DateTime keyword we can easily find out whether the Year is Leap Year or Not in C#.
int varYear = 2010;
bool varResult = DateTime.IsLeapYear(varYear);
if (varResult.Equals(true))
{
Response.Write(varYear + " is a Leap Year");
}
else
{
Response.Write(varYear + " is not a Leap Year");
}
int varYear = 2010;
bool varResult = DateTime.IsLeapYear(varYear);
if (varResult.Equals(true))
{
Response.Write(varYear + " is a Leap Year");
}
else
{
Response.Write(varYear + " is not a Leap Year");
}
Subscribe to:
Posts (Atom)