perlnewbie9292
Programmer
Hello I am new to C# and I am going through some examples.
I ran across this example for passing data between forms and I am not quite sure with the extra stuff after the return (memberVariable)
Specifically the == 0 ? 0 : totalHoursDecimal / numOfChargeInteger; part? Is there another way to write this same line of code?
Thanks for the help in advanced.
I ran across this example for passing data between forms and I am not quite sure with the extra stuff after the return (memberVariable)
Specifically the == 0 ? 0 : totalHoursDecimal / numOfChargeInteger; part? Is there another way to write this same line of code?
Thanks for the help in advanced.
Code:
public decimal avgCostDecimal
{
get
{
return numOfChargeInteger == 0 ? 0 : totalHoursDecimal / numOfChargeInteger;
}
}