I have a property declared as follows:
public decimal? MyProperty { get; set; }
I am needing to pass this value to another method as a string and so the only way I see to do so is as follows:
MyProperty == null ? null : MyProperty.ToString()
This looks very messy when you have a number of similar properties being passed into a method.
Does anyone know if there is a better and more concise way of writing this?
Oh, and if anyone can think of a more appropriate title to this question please feel free to change it...