CSharp examples for Custom Type:class
storing a double value in an object
using System;//from w ww . ja v a 2s . co m class Program { static void Main(string[] args) { object height = 1.88; // storing a double value in an object object name = "abc"; // storing a string value in an object int length2 = ((string)name).Length; // cast to access members Console.WriteLine(length2); Console.WriteLine(height); Console.WriteLine(name); } }