may be it is a simple question but I\'m try all of conversion method! and it still has error! would you help me?
decimal? (nullable decimal) to decimal
It depends what you want to do if the decimal? is null, since a decimal can't be null. If you want to default that to 0, you can use this code (using the null coalescing operator):
decimal?
null
decimal
decimal? nullabledecimal = 12; decimal myDecimal = nullabledecimal ?? 0;