PC Review


Reply
Thread Tools Rate Thread

How can I refer to an outer method?

 
 
Balint Toth
Guest
Posts: n/a
 
      2nd Mar 2004
Hi,

I would like to make some initialization code if the BringToFront method is
callod of a form.

So, I wrote:

public virtual void BringToFront()

{

initialization code...

xxx

}

I dont know what to write to the xxx after initialization. I would like to
call the original BringToFront method, but I dont know how to refer to it.
If I write simply BringToFront() , then it refers to my method, and will
cause error becouse of an infinite loop.

I'm sure this is thing of basic knowledge, but I can't figure it out. Any
hint? (in C++ -as I remember - the "::" did the thing)

Thanks in advance,

Bálint Tóth


 
Reply With Quote
 
 
 
 
Tim Wilson
Guest
Posts: n/a
 
      2nd Mar 2004
What about "base.BringToFront()"?

--
Tim Wilson
..Net Compact Framework MVP
{cf147fdf-893d-4a88-b258-22f68a3dbc6a}
"Balint Toth" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi,
>
> I would like to make some initialization code if the BringToFront method

is
> callod of a form.
>
> So, I wrote:
>
> public virtual void BringToFront()
>
> {
>
> initialization code...
>
> xxx
>
> }
>
> I dont know what to write to the xxx after initialization. I would like to
> call the original BringToFront method, but I dont know how to refer to it.
> If I write simply BringToFront() , then it refers to my method, and will
> cause error becouse of an infinite loop.
>
> I'm sure this is thing of basic knowledge, but I can't figure it out. Any
> hint? (in C++ -as I remember - the "::" did the thing)
>
> Thanks in advance,
>
> Bálint Tóth
>
>



 
Reply With Quote
 
Balint Toth
Guest
Posts: n/a
 
      2nd Mar 2004
That`s it! Thank you very much!

"Tim Wilson" <TIM(UNDERSCORE)WILSON(AT)ROGERS(PERIOD)COM> az alábbiakat írta
a következo üzenetben news:(E-Mail Removed)...
> What about "base.BringToFront()"?
>
> --
> Tim Wilson
> .Net Compact Framework MVP



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
invoking method of outer class from inner class. trialproduct2004@yahoo.com Microsoft C# .NET 3 25th Oct 2005 09:04 AM
Anymous method and outer variables =?Utf-8?B?RXRpZW5uZSBGb3J0aW4=?= Microsoft C# .NET 1 25th Sep 2005 04:50 PM
Cannot refer to an instance member of a class from within a shared method or shared member initializer without an explicit instance of the class. DJ Dev Microsoft ASP .NET 3 8th Feb 2004 04:19 PM
"Select Column method or property not available because some/all of object doesn't refer to table" Steven Rosenberg Microsoft Excel Programming 0 18th Aug 2003 04:41 AM
C# classes - how do I refer to a method in a class without instatiating it? kuvpatel Microsoft C# .NET 5 13th Aug 2003 01:00 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:41 AM.