Вопрос

I found this question: Why "decimal" is not a valid attribute parameter type? when I was searching for a solution to my original problem and understand that it is not an option, however, I am now curious as to how I should handle converting the value.

Would the best option be to just pass in doubles and then convert the attribute values to decimal or convert the property's value to double?

The actual implementation of the business logic is using IComparable so I have to do some sort of conversion. I am just not sure which way is best or if there was a neat workaround for handling the need for decimals in Attribute classes.

Это было полезно?

Решение

Went with using a string to handle the rounding issues as Hans mentioned.

If anyone has a better idea, please answer this question and I will mark it.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top