Posts by Pedro Santos • 103 points
2 posts
-
0
votes5
answers1583
viewsA: How to get the number of weeks in a date range in C#?
Try this method: public int totalSemanas(DateTime dataInicial, DateTime dataFim) { return (int)Math.Ceiling(((dataFim- dataInicial).TotalDays + 1) / 7d); } Or this: public int…
-
0
votes4
answers379
viewsA: What types of retain Cycles can be generated with ARC?
Another common problem has to do with blocks, for example if we have a property in a class that references a block and then inside the block we use self we can create a circular reference. @property…