Beruflich Dokumente
Kultur Dokumente
Las clases no estn aisladas, sino que se relacionan entre s, formando una jerarqua de
clasificacin. Los objetos heredan las propiedades y el comportamiento de todas las clases a
las que pertenecen. La herencia organiza y facilita el polimorfismo y el encapsulamiento
permitiendo a los objetos ser definidos y creados como tipos especializados de objetos
preexistentes.
Ejemplo de Clase
}
}
public DateTime FechaDeNacimiento
{
get
{
return m_FechaDeNacimiento;
}
set
{
m_FechaDeNacimiento = value;
IsModified = true;
}
}
#endregion
}
}
ADVE RTI SEM EN T
Me gusta:
Me gusta
S el primero en decir que te gusta esta post.
Comentarios
Ejemplo de Herencia
using System;
using Noixno.Common;
namespace MVAEscuela.Core.BE
{
[Serializable]
public partial class Instructor : Persona //Herencia
{
#region Private fields, to hold the state of the Instructor entity
private int m_IdInstructor;
private DateTime m_FechaIngreso;
#endregion
#region Public properties, to expose the state of the entity
public int IdInstructor
{
get
{
return m_IdInstructor;
}
set
{
m_IdInstructor = value;
IsModified = true;
}
}
public DateTime FechaIngreso
{
get
{
return m_FechaIngreso;
}
set
{
m_FechaIngreso = value;
IsModified = true;
}
}
#endregion
}
}
ADVE RTI SEM EN T
Me gusta:
Ejemplo Polimorfismo
SmtpServer.Send(mail);
}
catch (SmtpException ex)
{
info.Text = ex.Message;
}
catch (Exception ex)
{
info.Text = ex.Message;
}
}
}