The conversion of one data type into another data type is the Type Conversion or Type Casting. Let us look at some examples:
int to Boolean Datatype Conversion
using System; namespace TypeConversionApplication { class ExplicitConversion { static void Main(string[] args) { int a = 0; bool b = Convert.ToBoolean(a); Console.WriteLine(b); Console.ReadKey(); } } } Output : False
No comments:
Post a Comment