5
Reply

ToString() and Casting

Ask a question
Maha

Maha

11y
803
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)