Click here to Skip to main content
12,448,709 members (54,221 online)
   

C#

 
GeneralRe: how can i find number of days in a given year and month Pin
Member 42181431-Jun-09 22:14
memberMember 42181431-Jun-09 22:14 
AnswerRe: how can i find number of days in a given year and month Pin
Guffa1-Jun-09 22:43
mvpGuffa1-Jun-09 22:43 
GeneralRe: how can i find number of days in a given year and month Pin
musefan1-Jun-09 22:45
membermusefan1-Jun-09 22:45 
AnswerRe: how can i find number of days in a given year and month Pin
stancrm1-Jun-09 22:07
memberstancrm1-Jun-09 22:07 
GeneralRe: how can i find number of days in a given year and month [modified] Pin
Member 42181431-Jun-09 22:09
memberMember 42181431-Jun-09 22:09 
GeneralRe: how can i find number of days in a given year and month Pin
Guffa1-Jun-09 22:38
mvpGuffa1-Jun-09 22:38 
AnswerRe: how can i find number of days in a given year and month Pin
Ahmed Khallaf1-Jun-09 23:21
memberAhmed Khallaf1-Jun-09 23:21 
GeneralRe: how can i find number of days in a given year and month Pin
Guffa2-Jun-09 1:25
mvpGuffa2-Jun-09 1:25 
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.

GeneralRe: how can i find number of days in a given year and month Pin
Ahmed Khallaf2-Jun-09 3:10
memberAhmed Khallaf2-Jun-09 3:10 
QuestionHow to draw a pdf or postscript files to a graphics object Pin
MarkPhB1-Jun-09 21:05
memberMarkPhB1-Jun-09 21:05 
QuestionHow to paint a portion of IE window until it gets fully loaded with the requested URL? Pin
svt gdwl1-Jun-09 21:04
membersvt gdwl1-Jun-09 21:04 
QuestionProject deployment Pin
KIDYA1-Jun-09 21:01
memberKIDYA1-Jun-09 21:01 
AnswerRe: Project deployment Pin
Vuyiswa Maseko1-Jun-09 21:08
memberVuyiswa Maseko1-Jun-09 21:08 
QuestionPerl & c#.net Pin
balu123451-Jun-09 20:44
memberbalu123451-Jun-09 20:44 
QuestionRe: Perl & c#.net Pin
monstale1-Jun-09 20:58
membermonstale1-Jun-09 20:58 
QuestionHow to change Connection string at runtime for window application while using Linq to Sql Pin
Sanket.Patil1-Jun-09 20:40
memberSanket.Patil1-Jun-09 20:40 
AnswerRe: How to change Connection string at runtime for window application while using Linq to Sql Pin
Henry Minute2-Jun-09 2:16
memberHenry Minute2-Jun-09 2:16 
QuestionError:Project Properties/Resources: There is already another resource with the name 'Project1'. Pin
KIDYA1-Jun-09 20:19
memberKIDYA1-Jun-09 20:19 
AnswerRe: Error:Project Properties/Resources: There is already another resource with the name 'Project1'. Pin
Christian Graus1-Jun-09 20:27
mvpChristian Graus1-Jun-09 20:27 
GeneralRe: Error:Project Properties/Resources: There is already another resource with the name 'Project1'. Pin
Member 367560429-Nov-10 17:50
memberMember 367560429-Nov-10 17:50 
AnswerRe: Error:Project Properties/Resources: There is already another resource with the name 'Project1'. Pin
Member 435337124-Mar-14 16:32
memberMember 435337124-Mar-14 16:32 
Questionproblem of reports using in visual studio [modified] Pin
seeramzanse1-Jun-09 19:57
memberseeramzanse1-Jun-09 19:57 
AnswerRe: pleas help me urgently in the problem of reports using in visual studio Pin
Christian Graus1-Jun-09 20:11
mvpChristian Graus1-Jun-09 20:11 
GeneralRe: pleas help me urgently in the problem of reports using in visual studio Pin
seeramzanse1-Jun-09 20:18
memberseeramzanse1-Jun-09 20:18 
GeneralRe: pleas help me urgently in the problem of reports using in visual studio Pin
Christian Graus1-Jun-09 20:19
mvpChristian Graus1-Jun-09 20:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web02 | 2.8.160811.3 | Last Updated 26 Aug 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid