Click here to Skip to main content
15,878,814 members
Home / Discussions / C#
   

C#

 
AnswerRe: Many instances of the same class by a loop Pin
OriginalGriff20-Mar-14 23:27
mveOriginalGriff20-Mar-14 23:27 
AnswerRe: Many instances of the same class by a loop Pin
BobJanova21-Mar-14 0:28
BobJanova21-Mar-14 0:28 
QuestionAny Protobuf guru's here? Have problem with outputted data. Pin
DeepToot20-Mar-14 10:23
DeepToot20-Mar-14 10:23 
AnswerRe: Any Protobuf guru's here? Have problem with outputted data. Pin
Pete O'Hanlon20-Mar-14 13:46
mvePete O'Hanlon20-Mar-14 13:46 
GeneralRe: Any Protobuf guru's here? Have problem with outputted data. Pin
DeepToot21-Mar-14 3:29
DeepToot21-Mar-14 3:29 
QuestionWCF SSL overhead? Pin
SledgeHammer0120-Mar-14 9:35
SledgeHammer0120-Mar-14 9:35 
SuggestionRe: WCF SSL overhead? Pin
Richard MacCutchan20-Mar-14 22:41
mveRichard MacCutchan20-Mar-14 22:41 
QuestionC# Increase Hours and Minutes (TimeSpan) Pin
nicola_melc20-Mar-14 7:48
nicola_melc20-Mar-14 7:48 
Hi everyone,
I have a problem with my project.
I must to do a calendar with days and hours.

On the first's datagridview row I want to write this hour (07:00:00).
At this hour I want to add 30 minutes automatically.

I want that my output is like this:

07:00:00
07:30:00
08:00:00
08:30:00
...

But, it didn't works correctly.

This is my code:
TimeSpan ora = TimeSpan.FromHours(7);
TimeSpan mezzora = TimeSpan.FromMinutes(0);
TimeSpan orario;

for (int i = 0; i < 20; i++)
{
    dataGridView2.Rows.Add("");
    orario = ora + mezzora;
    dataGridView2[0, i].Value = orario;
    mezzora = TimeSpan.FromMinutes(30);
}


In output I have this:
07:00:00
07:30:00
07:30:00
07:30:00

Can you help me?
AnswerRe: C# Increase Hours and Minutes (TimeSpan) Pin
Pete O'Hanlon20-Mar-14 8:01
mvePete O'Hanlon20-Mar-14 8:01 
GeneralRe: C# Increase Hours and Minutes (TimeSpan) Pin
nicola_melc20-Mar-14 8:14
nicola_melc20-Mar-14 8:14 
GeneralRe: C# Increase Hours and Minutes (TimeSpan) Pin
Pete O'Hanlon20-Mar-14 8:14
mvePete O'Hanlon20-Mar-14 8:14 
QuestionWPF problem with ScrollViewer Pin
Federico Barbieri20-Mar-14 6:50
Federico Barbieri20-Mar-14 6:50 
QuestionRe: WPF problem with ScrollViewer Pin
Kenneth Haugland20-Mar-14 20:43
mvaKenneth Haugland20-Mar-14 20:43 
SuggestionRe: WPF problem with ScrollViewer Pin
Richard MacCutchan20-Mar-14 22:40
mveRichard MacCutchan20-Mar-14 22:40 
GeneralRe: WPF problem with ScrollViewer Pin
Federico Barbieri20-Mar-14 23:47
Federico Barbieri20-Mar-14 23:47 
Question//solved// help making class available to all Pin
Bosskardo20-Mar-14 4:19
Bosskardo20-Mar-14 4:19 
AnswerRe: help making class available to all Pin
Pete O'Hanlon20-Mar-14 4:57
mvePete O'Hanlon20-Mar-14 4:57 
AnswerRe: help making class available to all Pin
OriginalGriff20-Mar-14 5:56
mveOriginalGriff20-Mar-14 5:56 
AnswerRe: help making class available to all Pin
BobJanova20-Mar-14 7:55
BobJanova20-Mar-14 7:55 
GeneralRe: help making class available to all Pin
Bosskardo21-Mar-14 1:44
Bosskardo21-Mar-14 1:44 
QuestionMessage Removed Pin
20-Mar-14 3:39
protectorMarco Bertschi20-Mar-14 3:39 
Questionhow to use Response.Clear() in c# Pin
rincy sivan20-Mar-14 1:51
rincy sivan20-Mar-14 1:51 
AnswerRe: how to use Response.Clear() in c# Pin
Rob Philpott20-Mar-14 3:02
Rob Philpott20-Mar-14 3:02 
Questionc# code to copy paste whole pivot table in another sheet of excel Pin
rajnknit0719-Mar-14 23:32
rajnknit0719-Mar-14 23:32 
QuestionRe: c# code to copy paste whole pivot table in another sheet of excel Pin
Eddy Vluggen20-Mar-14 10:27
professionalEddy Vluggen20-Mar-14 10:27 

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.