- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Represent Int32 as a String in C#
Int32 represents a 32-bit signed integer. To represent it as a string, use the ToString() method.
Firstly, declare and initialize an Int32 variable.
int val = 1023;
Now, represent it as a string.
val.ToString()
Let us see the complete example.
Example
using System; class Demo { static void Main() { int val = 1023; Console.Write("Integer converted to string = "+val.ToString()); } }
Output
Integer converted to string = 1023
Advertisements