How can Erase decimal value to show?

I have a gui which show current Health points.

So I wrote ,

healthvalue.text = Status.curhp.ToString();

But if I take 0.5 or 0.001 damage, I don’t want to show it.

But now, it shows like 87.03141

How to erase .03141 ?

But only showing purpose.

Another var stores that exact life values.

This will do what you want:

 healthvalue.text = Status.curhp.ToString("F0");

The 0 after the F is the number of decimals to show. So, F1 would show one extra digit, etc.

Thanks! It is so simple!