Data type practical in .Net
using System;
class Boxing
{
public static void Main()
{
int a=10,b;
object o;
o=a; //boxing means here we have contain integer type value in object type
Console.WriteLine(o);
b=(int)o; //unboxing means here we have contain object type value in integer type
Console.WriteLine(b);
}
}
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
Comments
Post a Comment