I have a decimal value of 1.67 and wish to convert it to an int retaining its value.
I see examples such as the following:
decimal d = 12.30M;
which is great if you're hardcoding your values.
I'm not.
I have a method which is overriden and generates an int value which I get returned.
protected override int CallSomeMethod()
This method above is used all over the place and up until now it was not necessary to return a complete decimal value. With the int I get a rounded value back instead of the complete decimal value. So what I have started to do is change the return type of the method from int to decimal
protected override decimal CallSomeMethod()
This is now causing me numerous problems as I am now having to change the property datatypes of all my holding objects and will involve extensive testing of all changed code.
Is there an easier way to do this?
Thanks

New Topic/Question
Reply




MultiQuote





|