Frage

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.

War es hilfreich?

Lösung

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.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top