 | WeakDelegateIsAlive Property |
Gets a value indicating whether the
Delegate referenced by this
WeakDelegate has been garbage collected.
Namespace: DigitalRuneAssembly: DigitalRune (in DigitalRune.dll) Version: 1.20.0.0 (1.20.1.14552)
Syntaxpublic bool IsAlive { get; }
Public ReadOnly Property IsAlive As Boolean
Get
public:
property bool IsAlive {
bool get ();
}
member IsAlive : bool with get
Property Value
Type:
Boolean if the
Delegate referenced by the current
WeakDelegate has not been garbage collected and is still accessible;
otherwise,
.
RemarksImportant: Because an object could potentially be reclaimed for garbage
collection immediately after the IsAlive property returns
, using this property is not recommended unless you are testing only
for a return value.
If the referenced Delegate is a static method, IsAlive
will always return .
See Also