last day (16 days later) » 

9:10 AM
2
Q: Calculating Total Overtime for the week

Maracan someone help me, so I want to make a method that will calculate from the overtime list, the total hour for each week of the month. readonly List<KeyValuePair<DateTime, TimeSpan>> overTimeList = new List<KeyValuePair<DateTime, TimeSpan>>();//the list of overtime hours, the data is printed bel...

 
Could you please provide an explanation of your input data (along with C# compilable code that defines the input)? And then how that input is transformed into the output? And then what that output would be?
 
@Enigmativity Input would be the date for that month to start, in the while loops of the loop where I go for every day of the month. Then I thought I was going through a list of overtime (I already have overtime for each day), and I'm adding to the balance for all the days until it ends this week, and when it's over, I keep the total hours for that week and I enter the list . That would be enough for me.
 
@Mara - Can you please provide the input in valid C# code? And then what the output should be. Right now the question is not detailed enough.
 
@Enigmativity Thanks for the help, I corrected my question (code), I entered the input start parameter, and in order to invite the method, if I received the result for each week of the month of the total hour of that week in the form of Sunday, 05:00, that would be great.
 
@Mara - Please provide the input in valid C# code.
@Mara - Please provide the expected output for the input.
 
9:10 AM
@Enigmativity I corrected my question, I inserted the data from the list, and the data I want to get in the end
 
@Mara - Please can you make the input valid C# code? I should be able to copy, paste, and run your code. I want a minimal reproducible example.
 
@Enigmativity I set up all the necessary information I mean, I have nothing more to forward to you, that's what I hope to do. You have input into the method, the data from the overtime list, and the desired output that I would like to get in the list.
@Enigmativity I do not think that the question should be asked with a negative one, I tried all the information to pass, of course, those that are important
@Enigmativity The application is itself required to have it with a little bit of code, paste and run as you say it started.
 
@Mara - What don't you understand about providing the input data as valid C# code? I want to copy, paste, and run your code. I can't so it make it hard to answer your question and it makes your question hard for future readers to understand.
 
@Enigmativity To tell you honestly, I do not know what else I can put in the code, to make it clearer to you, and to run as a test that part. I copied everything and gave it as an example that I think is relevant. So how do I start, stop month, start the month and end with the WeeklyOverTime method, and finally I just want to get a list of this type 06/02/2019; 00.00, 06/09/2019; 13.00, 16/06/2019; -1.47, 06/23/2019; -00.27, 06/30/2019; 1.12 please understand my problem
@Enigmativity do you have time to discuss the code?
 

  last day (16 days later) »