Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

weakreference tryget c#

WeakReference<MyObject> ref2 = new WeakReference<MyObject>(new MyObject());
MyObject obj2;
if (ref2.TryGetTarget(out obj2))
{
    DoSomething(obj2);
}
Source by www.philosophicalgeek.com #
 
PREVIOUS NEXT
Tagged: #weakreference #tryget
ADD COMMENT
Topic
Name
8+6 =