Share via


WeakReference.Target Property

Gets or sets the object (the target) referenced by the current WeakReference object.

Namespace: System
Assembly: mscorlib (in mscorlib.dll)

Syntax

public virtual Object Target { get; set; }

Property Value

A null reference if the object referenced by the current object has been collected as garbage; otherwise, a reference to the object referenced by the current object.

Remarks

An exception is thrown if the reference to the object referenced by the current object is invalid. This can occur if there is an attempt to resurrect the referenced object after it has been finalized.

Version Information

Available in .NET Micro Framework version 2.0, 2.5

See Also

Reference

WeakReference Class
WeakReference Members
System Namespace