Click here to Skip to main content
15,919,028 members
Home / Discussions / C#
   

C#

 
GeneralRe: Returning multiple values from methods Pin
MilesAhead24-May-04 7:34
MilesAhead24-May-04 7:34 
GeneralCausing a time delay within a method Pin
Anonymous22-May-04 11:57
Anonymous22-May-04 11:57 
GeneralRe: Causing a time delay within a method Pin
bjoernen22-May-04 12:55
bjoernen22-May-04 12:55 
GeneralRe: Causing a time delay within a method Pin
Colin Angus Mackay22-May-04 12:56
Colin Angus Mackay22-May-04 12:56 
GeneralRe: Causing a time delay within a method Pin
Marc Clifton22-May-04 15:00
mvaMarc Clifton22-May-04 15:00 
GeneralStackFrame Pin
TuringTest122-May-04 11:16
TuringTest122-May-04 11:16 
GeneralRe: StackFrame Pin
Colin Angus Mackay22-May-04 13:03
Colin Angus Mackay22-May-04 13:03 
GeneralRe: StackFrame Pin
Marc Clifton22-May-04 15:11
mvaMarc Clifton22-May-04 15:11 
TuringTest1 wrote:
suppose i am a method and want to know the instance of the class calling me

OK, here goes. Obviously, the instance is available because, when using the debugger, you can click on the prior calls in the stack. That takes you to the caller code, and then you can inspect variables in that instance.

However, what exactly would you do with the instance yourself? The way the debugger gets it is because the class instance is either stored in a CPU register or is somehow obtainable by inspecting the stack (I can't remember if "this" gets pushed or not). Anyways, it's just an address. The debugger is doing some magic by converting the pointer to a class. In C++, that's easy, but in C#, I'm not sure it's possible.

Marc

Microsoft MVP, Visual C#
MyXaml
MyXaml Blog
GeneralRe: StackFrame Pin
TuringTest122-May-04 16:33
TuringTest122-May-04 16:33 
GeneralRe: StackFrame Pin
leppie23-May-04 2:22
leppie23-May-04 2:22 
GeneralRe: StackFrame Pin
TuringTest123-May-04 10:47
TuringTest123-May-04 10:47 
GeneralRe: StackFrame Pin
Heath Stewart23-May-04 3:53
protectorHeath Stewart23-May-04 3:53 
GeneralFile size Pin
PaleyX22-May-04 8:31
PaleyX22-May-04 8:31 
GeneralRe: File size Pin
MyBlindy22-May-04 8:53
MyBlindy22-May-04 8:53 
GeneralRe: File size Pin
PaleyX22-May-04 13:31
PaleyX22-May-04 13:31 
GeneralRe: File size Pin
Member 93002222-May-04 8:59
Member 93002222-May-04 8:59 
GeneralRCW question when returning a string Pin
Nish Nishant22-May-04 3:33
sitebuilderNish Nishant22-May-04 3:33 
GeneralRe: RCW question when returning a string Pin
Heath Stewart22-May-04 3:49
protectorHeath Stewart22-May-04 3:49 
GeneralRe: RCW question when returning a string Pin
Nish Nishant22-May-04 3:58
sitebuilderNish Nishant22-May-04 3:58 
GeneralRe: RCW question when returning a string Pin
Heath Stewart22-May-04 4:07
protectorHeath Stewart22-May-04 4:07 
GeneralRe: RCW question when returning a string Pin
Nish Nishant22-May-04 4:17
sitebuilderNish Nishant22-May-04 4:17 
GeneralRe: RCW question when returning a string Pin
Heath Stewart22-May-04 4:18
protectorHeath Stewart22-May-04 4:18 
Generallistbox control in C# Pin
HowRU21-May-04 22:22
HowRU21-May-04 22:22 
GeneralRe: listbox control in C# Pin
Heath Stewart22-May-04 4:52
protectorHeath Stewart22-May-04 4:52 
GeneralPassing a Class to an Unmanaged function as parameter Pin
shajuMathew21-May-04 20:49
shajuMathew21-May-04 20:49 

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.