
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Convert String to Int in C#
Let’s say our string is −
string str ="9999";
Now, use the Int32.Parse() to convert the string into integer −
int n = Int32.Parse(str);
Now display the integer value as shown in the following code −
Example
using System; class Demo { static void Main() { string str ="9999"; int n = Int32.Parse(str); Console.WriteLine(n); } }
Advertisements