Click here to Skip to main content
15,902,777 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to get the instance that called a method. Pin
DaveyM6915-Jan-09 3:42
professionalDaveyM6915-Jan-09 3:42 
AnswerRe: How to get the instance that called a method. Pin
Tim Groven15-Jan-09 3:42
Tim Groven15-Jan-09 3:42 
GeneralRe: How to get the instance that called a method. Pin
DaveyM6915-Jan-09 3:50
professionalDaveyM6915-Jan-09 3:50 
AnswerRe: How to get the instance that called a method. Pin
musefan15-Jan-09 3:55
musefan15-Jan-09 3:55 
GeneralRe: How to get the instance that called a method. Pin
DaveyM6915-Jan-09 4:21
professionalDaveyM6915-Jan-09 4:21 
AnswerRe: How to get the instance that called a method. Pin
Pete O'Hanlon15-Jan-09 4:02
mvePete O'Hanlon15-Jan-09 4:02 
GeneralRe: How to get the instance that called a method. Pin
DaveyM6915-Jan-09 4:03
professionalDaveyM6915-Jan-09 4:03 
GeneralRe: How to get the instance that called a method. Pin
DaveyM6915-Jan-09 6:35
professionalDaveyM6915-Jan-09 6:35 
Thanks for the link - I'd never looked at that pattern - I definately need to do some re-reading to 'freshen' up.

What I'm trying to do is more of a generic Observer type pattern, but using a Singleton for the subject so it's accessible by any instance of any type. Mika and I have got quite a way into this and it's pretty much working apart from this, which is a bit ugly at the moment. I've overloaded the Notify methods so that the instance can be sent as a parameter, but I'd rather make that part automated. The reference to the original instance must surely be somewhere(stack?) for the method to be able to return?

Dave
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)

GeneralRe: How to get the instance that called a method. Pin
Pete O'Hanlon15-Jan-09 9:43
mvePete O'Hanlon15-Jan-09 9:43 
GeneralRe: How to get the instance that called a method. Pin
Jon Rista16-Jan-09 6:54
Jon Rista16-Jan-09 6:54 
Questionread coulmn from file and store it to array Pin
sudany_zool15-Jan-09 2:58
sudany_zool15-Jan-09 2:58 
AnswerRe: read coulmn from file and store it to array Pin
SeMartens15-Jan-09 3:04
SeMartens15-Jan-09 3:04 
GeneralRe: read coulmn from file and store it to array Pin
sudany_zool15-Jan-09 3:31
sudany_zool15-Jan-09 3:31 
GeneralRe: read coulmn from file and store it to array Pin
SeMartens15-Jan-09 3:42
SeMartens15-Jan-09 3:42 
GeneralRe: read coulmn from file and store it to array Pin
sudany_zool15-Jan-09 3:59
sudany_zool15-Jan-09 3:59 
QuestionReaderWriterLock Pin
the_jat15-Jan-09 2:30
the_jat15-Jan-09 2:30 
AnswerRe: ReaderWriterLock Pin
Luc Pattyn15-Jan-09 2:53
sitebuilderLuc Pattyn15-Jan-09 2:53 
AnswerRe: ReaderWriterLock Pin
Jon Rista16-Jan-09 6:57
Jon Rista16-Jan-09 6:57 
AnswerRe: ReaderWriterLock Pin
Mark Salsbery16-Jan-09 7:50
Mark Salsbery16-Jan-09 7:50 
QuestionDrawing cards from a deck Pin
Tony Pottier15-Jan-09 2:18
Tony Pottier15-Jan-09 2:18 
AnswerRe: Drawing cards from a deck Pin
CPallini15-Jan-09 2:41
mveCPallini15-Jan-09 2:41 
GeneralRe: Drawing cards from a deck Pin
Tony Pottier15-Jan-09 4:01
Tony Pottier15-Jan-09 4:01 
AnswerRe: Drawing cards from a deck Pin
benjymous15-Jan-09 2:50
benjymous15-Jan-09 2:50 
GeneralRe: Drawing cards from a deck Pin
Tony Pottier15-Jan-09 4:03
Tony Pottier15-Jan-09 4:03 
GeneralRe: Drawing cards from a deck Pin
Tony Pottier15-Jan-09 4:16
Tony Pottier15-Jan-09 4:16 

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.