I have this property value and i need its string value as its being recorded in a XML which is read from.
Now my problem is that when I do:
Example value is 1.0
MyProperty.StringValue.ToString
gives 1
how can I get this value to be in a string format but diplay the full entered 1.0
I have tried
MyProperty.StringValue.ToString.Format("D")
which gives D
bearing in mind I need any value that was entered to come out as it is …
when I have for example 1.5 its comes back as 1.5
it only happens with 0 on the other side…
EXAMPLES
I dont understand what is exactly needed by more examples…. Its very simple….
User input is 1.0
the value is then converted to string
and it drops the 0
so in the end is just 1
thats wrong because it is string it should reflect the value entered exactly as it is .
now if I entered 1.5
the value is then converted to string
and in the end it comes back with 1.5
thats ok , becuase it was entered like that
If i entered 132
the value is then converted to string
and should and does come back as 132
hope this is enough
Try this instead: