[RESOLVED] C# equivalent of Mybase.New()?
What is the C# equivalent of VB.Net's
??
I'm inheriting from ApplicationException and the normal practice in VB.net is to call the the base class constructor from within the derived class's constructor.
At the moment I have this, where I have shown the line I want to change...
Code:
public class SudokuGridIllegalException : ApplicationException
{
//constructor of my derived class
public SudokuGridIllegalException(String message)
{
// call the base's constructor
/* wrong */ mybase.New(message);
}
}
Is this even the way you do this in C#? *noobz* :)
Re: [RESOLVED] C# equivalent of Mybase.New()?
Never mind, sorted it out...
public class SudokuGridIllegalException : ApplicationException
{
public SudokuGridIllegalException(String message) : base(message)
{
}
}
Re: [RESOLVED] C# equivalent of Mybase.New()?
Hmmm...how did you find that out...hmmm...:D
Re: [RESOLVED] C# equivalent of Mybase.New()?
Some idiot on MSN just told me. :D
Re: [RESOLVED] C# equivalent of Mybase.New()?
what are you doing learning C# you moron:D
take a look at my thread
http://vbforums.com/showthread.php?t=344688
Re: [RESOLVED] C# equivalent of Mybase.New()?
Re: [RESOLVED] C# equivalent of Mybase.New()?
Quote:
Originally Posted by wossname
You don't like C#?
i do:) but all your c# are belong to me :thumb: