i have a class that i'm trying to understand that overrides
BaseApplication Exception's methods as follows. What i dont' understand is
that i have never seen the inherit ":" on a method signature, only on a
class declaration.
Can you explain what is going on here. Is it that the implementation of the
method that is overriding the base's method simply uses the base's
implementation all along (if so, why override the method to begin with?)?
[Serializable()]
public sealed class BusinessExcepti on : BaseApplication Exception,
ISerializable
{
/// <summary>
/// Initializes a new instance of the <see cref="BusinessE xception"/>
class.
/// </summary>
public BusinessExcepti on() : base()
{
}
/// <summary>
/// Initializes a new instance of the <see cref="BusinessE xception"/>
class with a specified error message.
/// </summary>
/// <param name="message"> The error message that explains the reason for
the exception.</param>
public BusinessExcepti on(string message) : base(message)
{
}
/// <summary>
/// Initializes a new instance of the <see cref="BusinessE xception"/>
class with a specified
/// error message and a reference to the inner exception that is the cause
of this exception.
/// </summary>
/// <param name="message"> The error message that explains the reason for
the exception.</param>
/// <param name="innerExce ption">
/// The exception that is the cause of the current exception. If the
<paramref name="innerExce ption" /> parameter is not a
/// null reference, the current exception is raised in a <c>catch</c>
block that handles the inner exception.
/// </param>
public BusinessExcepti on(string message, Exception innerException) :
base(message, innerException)
{
}
}
BaseApplication Exception's methods as follows. What i dont' understand is
that i have never seen the inherit ":" on a method signature, only on a
class declaration.
Can you explain what is going on here. Is it that the implementation of the
method that is overriding the base's method simply uses the base's
implementation all along (if so, why override the method to begin with?)?
[Serializable()]
public sealed class BusinessExcepti on : BaseApplication Exception,
ISerializable
{
/// <summary>
/// Initializes a new instance of the <see cref="BusinessE xception"/>
class.
/// </summary>
public BusinessExcepti on() : base()
{
}
/// <summary>
/// Initializes a new instance of the <see cref="BusinessE xception"/>
class with a specified error message.
/// </summary>
/// <param name="message"> The error message that explains the reason for
the exception.</param>
public BusinessExcepti on(string message) : base(message)
{
}
/// <summary>
/// Initializes a new instance of the <see cref="BusinessE xception"/>
class with a specified
/// error message and a reference to the inner exception that is the cause
of this exception.
/// </summary>
/// <param name="message"> The error message that explains the reason for
the exception.</param>
/// <param name="innerExce ption">
/// The exception that is the cause of the current exception. If the
<paramref name="innerExce ption" /> parameter is not a
/// null reference, the current exception is raised in a <c>catch</c>
block that handles the inner exception.
/// </param>
public BusinessExcepti on(string message, Exception innerException) :
base(message, innerException)
{
}
}
Comment