Created
January 24, 2018 08:42
-
-
Save grumpydev/7a7c776ea506c790cf09eb4d93718ac9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Program | |
{ | |
public class TimeTargetCategory | |
{ | |
public Guid Id { get; set; } | |
public Guid TimeTargetId { get; set; } | |
public Guid CategoryId { get; set; } | |
public decimal? MondayTarget { get; set; } | |
public decimal? TuesdayTarget { get; set; } | |
public decimal? WednesdayTarget { get; set; } | |
public decimal? ThursdayTarget { get; set; } | |
public decimal? FridayTarget { get; set; } | |
public decimal? SaturdayTarget { get; set; } | |
public decimal? SundayTarget { get; set; } | |
} | |
static void Main(string[] args) | |
{ | |
var timeTargetCategory = new TimeTargetCategory | |
{ | |
MondayTarget = 6, | |
TuesdayTarget = 6, | |
WednesdayTarget = 6, | |
ThursdayTarget = 6, | |
FridayTarget = 6, | |
SaturdayTarget = 6, | |
SundayTarget = 6 | |
}; | |
var result = timeTargetCategory.MondayTarget ?? 0 + | |
timeTargetCategory.TuesdayTarget ?? 0 + | |
timeTargetCategory.WednesdayTarget ?? 0 + | |
timeTargetCategory.ThursdayTarget ?? 0 + | |
timeTargetCategory.FridayTarget ?? 0 + | |
timeTargetCategory.SaturdayTarget ?? 0 + | |
timeTargetCategory.SundayTarget ?? 0; | |
Console.WriteLine("Result: {0}", result); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment