---
title: "How to parse the value to float?"  
description: "How to parse the value to float?"  
author: "Anonymous User"  
published: 2013-05-09  
updated: 2013-05-09  
canonical: https://www.mindstick.com/forum/847/how-to-parse-the-value-to-float  
category: "c#"  
tags: ["c#"]  
reading_time: 1 minute  

---

# How to parse the value to float?

Hi!\
How to [parse](https://www.mindstick.com/forum/12870/how-to-parse-json-array-using-newtonsoft) a [value](https://www.mindstick.com/articles/23219/an-optimized-description-adds-value-to-experience-and-in-turn-effectively-guest-posting-packages) to float? When I try to parse that generate error as following\
My line of code as following\
float rt = float.Parse("12.50%");\
[Error message](https://www.mindstick.com/forum/23174/error-message-the-page-you-are-requesting-cannot-be-served-because-of-the-extension-configuration)\
System.FormatException: [Input](https://www.mindstick.com/forum/159209/how-can-i-read-convert-an-input-stream-into-a-string-in-java) [string](https://www.mindstick.com/articles/1527/string-split-in-c-sharp) was not in a [correct format](https://www.mindstick.com/forum/72/input-string-was-not-in-a-correct-format).\
Please [resolve](https://www.mindstick.com/forum/159427/windows-app-dll-not-found-resolve-library-issue) my problem. \
Thank in [advance](https://www.mindstick.com/blog/33258/jee-mains-and-jee-advance-exams)!

## Replies

### Reply by AVADHESH PATEL

Hi Lois!\
Try as following\
float rt = float.Parse("12.50%".Replace("%",""));


---

Original Source: https://www.mindstick.com/forum/847/how-to-parse-the-value-to-float

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
