If I inherit from a base class and want to pass something from the constructor of the inherited class to the constructor of the base class, how do I do that?
For exa
Note that you can use static methods within the call to the base constructor.
class MyExceptionClass : Exception
{
public MyExceptionClass(string message, string extraInfo) :
base(ModifyMessage(message, extraInfo))
{
}
private static string ModifyMessage(string message, string extraInfo)
{
Trace.WriteLine("message was " + message);
return message.ToLowerInvariant() + Environment.NewLine + extraInfo;
}
}