11. object in c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace objecttypeexample
{
class Program
{
static void Main(string[] args)
{
object ans;
ans = 22;
ans = "abc";
ans = true; // print this (last value is assign)
Console.WriteLine("Ans=" + ans);
Console.Read();
}
}
}
Comments
Post a Comment