Hello sir
I am a Computer Science Student and Usually Work with C# as my favorite language. I have encountered a problem i.e How to get an integer part and decimal part from a float value?
Eg: x=12.75
I want to get 12 separately and place it in one variable and 75 in another variable I tried many logic but i did not find a solution.
How to get a integer part and decimal part from a float value?
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Graham Shorey42 reputationPosted Dec 13, 2006, 2:38 AM EST
string[] a = x.ToString().Split('.');