5
Answers

ToString() and Casting

Maha

Maha

11y
804
1
In this program ToString() method is function as casting, because it is converting one data type to other. I wish to know whether my understanding is correct.

using System;

class Program
{
static void Main()
{
int a = 4000;

string a1 = a.ToString();

Console.WriteLine(a1);

Console.ReadKey();
}
}

Answers (5)