Current / Context property in class
Posted
by richard-heesbeen
on Stack Overflow
See other posts from Stack Overflow
or by richard-heesbeen
Published on 2010-05-13T16:27:57Z
Indexed on
2010/05/13
16:34 UTC
Read the original article
Hit count: 242
Hi,
I would like to implement an current property in my class which returns the current active context of the class (much like httpcontext.current etc.), like so:
using(classA x = new classA(..))
{
classB.Dosomething();
}
where the method dosomething() gets the current context of classA to perform some operation.
How would i go about creating such functionality?
Greetz, Richard
© Stack Overflow or respective owner