C# Corner
Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
.NET
ADO.NET
Android
ASP.NET
C#
Databases & DBA
Design Patterns & Practices
iOS
Java
OOP/OOD
SharePoint
Software Testing
Web Development
WPF
View All
4
Reply
Converting string to float value.
abhishek aerrolu
17y
5.5k
0
Reply
Delete Row
Delete Column
Insert Link
×
Insert
Cancel
Embed YouTube Video
×
Width (%)
Height (%)
Insert
Cancel
Table Options
×
Rows
Columns
First row as header
Create Table
Insert Image
×
Selected file:
Alignment
Left
Center
Right
Select an image from your device to upload
Upload to Server
Cancel
Submit
float num=Convert.ToSingle("5.3");
Ganesh Prabhu
7y
0
use convertopction convert.TOfloat
sara vanan
17y
0
use the following code : float f1 = float.Parse(textBox1.Text.Trim());
Farhad
17y
0
In the windows form, I have a text box which accept the float value Unable to convert the text box string to float, the code is as below. float f1=(float) textbox1.Text.Trim(); The error I get is "Cannot convert string to float"
abhishek aerrolu
17y
0
Message