Click here to Skip to main content
15,909,827 members
Home / Discussions / C#
   

C#

 
GeneralRe: Declaration Default Argument Values Pin
S Sansanwal23-Aug-04 23:54
S Sansanwal23-Aug-04 23:54 
GeneralRe: Declaration Default Argument Values Pin
Heath Stewart24-Aug-04 8:09
protectorHeath Stewart24-Aug-04 8:09 
GeneralHosting Managed Controls in MFC Pin
Amir Harel23-Aug-04 23:13
Amir Harel23-Aug-04 23:13 
Generaldatabound list with customisable filter Pin
..Hubert..23-Aug-04 23:03
..Hubert..23-Aug-04 23:03 
GeneralIP-Tunnel Pin
erina54823-Aug-04 22:55
erina54823-Aug-04 22:55 
GeneralRe: IP-Tunnel Pin
Dave Kreskowiak24-Aug-04 6:56
mveDave Kreskowiak24-Aug-04 6:56 
GeneralISOBARS Pin
beolijza23-Aug-04 22:39
beolijza23-Aug-04 22:39 
QuestionHow do I call a base class function from a derived class function? Pin
Salil Khedkar23-Aug-04 20:21
Salil Khedkar23-Aug-04 20:21 
I have just started with C# and porting a C++ application. In C++, I can augment a derived class function like the code below:

void DerivedClass::Foo ()
{
/*
Do some processing…
*/

BaseClass::Foo ();
}

How can I achieve this in C#? I found the below idea as a working solution, but then it does not allow me to override the Foo() function, it advices to have a ‘new’ implementation.

public new string Foo()
{
BaseClass oBaseClass = this as BaseClass;
return oBaseClass.Foo();
}

Can somebody explain the theory to me please...

AnswerRe: How do I call a base class function from a derived class function? Pin
Colin Angus Mackay23-Aug-04 20:44
Colin Angus Mackay23-Aug-04 20:44 
GeneralRe: How do I call a base class function from a derived class function? Pin
Salil Khedkar23-Aug-04 21:19
Salil Khedkar23-Aug-04 21:19 
GeneralRe: How do I call a base class function from a derived class function? Pin
leppie23-Aug-04 21:31
leppie23-Aug-04 21:31 
GeneralRe: How do I call a base class function from a derived class function? Pin
Colin Angus Mackay24-Aug-04 0:29
Colin Angus Mackay24-Aug-04 0:29 
AnswerRe: How do I call a base class function from a derived class function? Pin
Salil Khedkar23-Aug-04 22:11
Salil Khedkar23-Aug-04 22:11 
GeneralNew to C# Pin
Vicks23-Aug-04 20:00
Vicks23-Aug-04 20:00 
GeneralRe: New to C# Pin
Colin Angus Mackay23-Aug-04 20:29
Colin Angus Mackay23-Aug-04 20:29 
GeneralRe: New to C# Pin
Salil Khedkar23-Aug-04 20:30
Salil Khedkar23-Aug-04 20:30 
GeneralRe: New to C# Pin
sreejith ss nair23-Aug-04 22:43
sreejith ss nair23-Aug-04 22:43 
GeneralRe: New to C# Pin
S Sansanwal23-Aug-04 23:52
S Sansanwal23-Aug-04 23:52 
GeneralRe: New to C# Pin
billb211224-Aug-04 3:41
billb211224-Aug-04 3:41 
GeneralRe: New to C# Pin
Nick Parker24-Aug-04 4:48
protectorNick Parker24-Aug-04 4:48 
GeneralMicrosoft Visual Studio.NET IDE Help Required Pin
nutkase23-Aug-04 19:22
nutkase23-Aug-04 19:22 
GeneralRe: Microsoft Visual Studio.NET IDE Help Required Pin
leppie23-Aug-04 21:41
leppie23-Aug-04 21:41 
GeneralRe: Microsoft Visual Studio.NET IDE Help Required Pin
nutkase24-Aug-04 1:44
nutkase24-Aug-04 1:44 
GeneralRe: Microsoft Visual Studio.NET IDE Help Required Pin
Heath Stewart24-Aug-04 7:48
protectorHeath Stewart24-Aug-04 7:48 
GeneralRe: Microsoft Visual Studio.NET IDE Help Required Pin
Heath Stewart24-Aug-04 7:38
protectorHeath Stewart24-Aug-04 7:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.