|
If only somebody somewhere would invent a technology that allowed you to search[^] over billions of pages of indexed content based on keywords. Why, if they could do that, they'd be rich - they might actually be worth 3 or 4 dollars.
If only... Sigh.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Welcome Pete [^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
The link below will solve your problems.
Christian Graus
Driven to the arms of OSX by Vista.
Please read this[ ^] if you don't like the answer I gave to your question.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
|
|
|
|
|
how can i find number of days in a given year and month
|
|
|
|
|
Number of days in a year is a constant (varies for a leap year). Number of days in any given month is going to be a constant (except for February in a leap year). Which part of this are you having a difficulty with?
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
thank you for your replay and you solved the problem and i remembered that if we want to know if February in a leap year or not by divided the year by 4 and if the result is an integer number it will be leap year such as 2004/4=501 this is a leap year and 2005/4=501.25 it's not a leap year
and i'll to try it by code
Many thanks for all
modified on Tuesday, June 2, 2009 3:48 AM
|
|
|
|
|
Ooh - not quite. If it's a century, it has to be divisible by 400 to be a leap year, so 2000 is a leap year and 2100 isn't.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Let us hope that his code will not have to run for a century.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
is 2100 really not a leap year?
EDIT: It's OK I WIKI it and got an answer
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
|
use modulus (provides the remainder after a division) not divide...
if(year % 4 == 0)
else
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
Many Thanks and i'm very happy from Your cooperation
|
|
|
|
|
Ok this is what you should use instead...
if(year % 4 == 0 && year % 100 == 0 ? year % 400 == 0 : true)
else
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
you realy have come to the right solution
thank you
|
|
|
|
|
Or if you don't want to reinvent the wheel:
if (DateTime.IsLeapYear(year)) {
} else {
}
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
I think we all need new wheels
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
int daysInMonth = DateTime.DaysInMonth(2009, 2);
Console.WriteLine(daysInMonth);
|
|
|
|
|
i don't know if the user will enter 2009 or 2008 or any month i want to take the data from the user
modified on Tuesday, June 2, 2009 4:19 AM
|
|
|
|
|
Then you just use variables in the call to the DaysInMonth method instead of the literal values used in the example.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
|
Have a look at this:
private void button1_Click(object sender, EventArgs e) {
button1.Enabled = false;
int year = dateTimePicker1.Value.Year;
int month = dateTimePicker1.Value.Month;
DateTime start = new DateTime(year, month, 1);
dateTimePicker1.Value = start;
int days = DateTime.DaysInMonth(year, month);
for (int i = 0; i < days; i++) {
dataGridView1.Rows.Add();
dataGridView1.Rows[i].Cells[0].Value = start.AddDays(i).DayOfWeek;
dataGridView1.Rows[i].Cells[1].Value = start.AddDays(i).ToShortDateString();
}
}
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
a very Clever man this what i want to reach thank you
|
|
|
|
|
Hi =),
I want to draw the content of a pdf or postscript file on on a graphics object.
I searched already, but i just found nothing useful.
Does anyone of you know how to do that ?
thanks in advance.
|
|
|
|
|
I want the browser(IE) to show empty in its window intially for a particular period of time,
How can I do this in c#?
Normally in VC, WM_PAINT is the message that makes a request to paint a portion of an application's window.
In c#, How can I paint the a portion of IE window?
Is there any other methods to achieve this?
|
|
|
|
|
Hello experts
I am deploying project1 which contain another 2 projects.when i finish setup and run it then that another 2 project forms not working.Is there any mistake done by me while deploying it?
tel me,project at finish line,Fast.
|
|
|
|