// ===++=== // // OrtizOL // // ===--=== /*============================================================ // // Clase: GetTypeYtypeof.cs // // Propósito: Uso general del método GetType y el operador // typeof // ============================================================*/ using System; public class Punto { public int X { get; set; } public int Y { get; set; } } public class Prueba { public static void Main() { Punto p = new Punto(); Console.WriteLine( p.GetType().Name); Console.WriteLine( typeof (Punto).Name); Console.WriteLine( p.GetType() == typeof(Punto)); Console.WriteLine( p.X.GetType().Name); Console.WriteLine( p.Y.GetType().Name); } }