Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to remove decimals from string
Message
From
20/04/2010 11:42:09
 
 
To
20/04/2010 11:32:53
Jerry Tovar
Dana Corporation Dana It
Maumee, Ohio, United States
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
C# 2.0
Miscellaneous
Thread ID:
01461123
Message ID:
01461128
Views:
83
This message has been marked as the solution to the initial question of the thread.
>Using C#, how can I remove the decimals from a string? For example:
>
>"123.00" convert to "123"
>
>Thanks,
>
>Jerry
			string s = "123.00";
			string q = s.Split('.')[0];
			Console.WriteLine("{0}", q);
			Console.ReadLine();
Gregory
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform