T
TS
i have a class that i'm trying to understand that overrides
BaseApplicationException'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 BusinessException : BaseApplicationException,
ISerializable
{
/// <summary>
/// Initializes a new instance of the <see cref="BusinessException"/>
class.
/// </summary>
public BusinessException() : base()
{
}
/// <summary>
/// Initializes a new instance of the <see cref="BusinessException"/>
class with a specified error message.
/// </summary>
/// <param name="message">The error message that explains the reason for
the exception.</param>
public BusinessException(string message) : base(message)
{
}
/// <summary>
/// Initializes a new instance of the <see cref="BusinessException"/>
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="innerException">
/// The exception that is the cause of the current exception. If the
<paramref name="innerException" /> parameter is not a
/// null reference, the current exception is raised in a <c>catch</c>
block that handles the inner exception.
/// </param>
public BusinessException(string message, Exception innerException) :
base(message, innerException)
{
}
}
BaseApplicationException'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 BusinessException : BaseApplicationException,
ISerializable
{
/// <summary>
/// Initializes a new instance of the <see cref="BusinessException"/>
class.
/// </summary>
public BusinessException() : base()
{
}
/// <summary>
/// Initializes a new instance of the <see cref="BusinessException"/>
class with a specified error message.
/// </summary>
/// <param name="message">The error message that explains the reason for
the exception.</param>
public BusinessException(string message) : base(message)
{
}
/// <summary>
/// Initializes a new instance of the <see cref="BusinessException"/>
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="innerException">
/// The exception that is the cause of the current exception. If the
<paramref name="innerException" /> parameter is not a
/// null reference, the current exception is raised in a <c>catch</c>
block that handles the inner exception.
/// </param>
public BusinessException(string message, Exception innerException) :
base(message, innerException)
{
}
}