
- C# Basic Tutorial
- C# - Home
- C# - Overview
- C# - Environment
- C# - Program Structure
- C# - Basic Syntax
- C# - Data Types
- C# - Type Conversion
- C# - Variables
- C# - Constants
- C# - Operators
- C# - Decision Making
- C# - Loops
- C# - Encapsulation
- C# - Methods
- C# - Nullables
- C# - Arrays
- C# - Strings
- C# - Structure
- C# - Enums
- C# - Classes
- C# - Inheritance
- C# - Polymorphism
- C# - Operator Overloading
- C# - Interfaces
- C# - Namespaces
- C# - Preprocessor Directives
- C# - Regular Expressions
- C# - Exception Handling
- C# - File I/O
- C# Advanced Tutorial
- C# - Attributes
- C# - Reflection
- C# - Properties
- C# - Indexers
- C# - Delegates
- C# - Events
- C# - Collections
- C# - Generics
- C# - Anonymous Methods
- C# - Unsafe Codes
- C# - Multithreading
- C# Useful Resources
- C# - Questions and Answers
- C# - Quick Guide
- C# - Useful Resources
- C# - Discussion
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
- Related Articles
- Represent Int32 as a Binary String in C#
- Represent Int32 as a Hexadecimal String in C#
- Represent Int32 as a Octal String in C#
- Represent Int64 as a String in C#
- Represent Int64 as a Binary string in C#
- Represent Int64 as a Octal string in C#
- Represent Int64 as a Hexadecimal String in C#
- Char.IsControl(String, Int32) Method in C#
- Char.ConvertToUtf32(String, Int32) Method in C#
- Char.IsLowSurrogate(String, Int32) Method in C#
- Char.IsSurrogate(String, Int32) Method in C#
- Char.IsSurrogatePair(String, Int32) Method in C#
- Char.IsHighSurrogate(String, Int32) Method in C#
- Char.GetUnicodeCategory(String, Int32) Method with Examples in C#
- Array.BinarySearch(Array, Int32, Int32, Object) Method with examples in C#

Advertisements