WeakReference<T> Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Initializes a new instance of the WeakReference<T> class.
Overloads
WeakReference<T>(T) |
Initializes a new instance of the WeakReference<T> class that references the specified object. |
WeakReference<T>(T, Boolean) |
Initializes a new instance of the WeakReference<T> class that references the specified object and uses the specified resurrection tracking. |
WeakReference<T>(T)
- Source:
- WeakReference.T.cs
- Source:
- WeakReference.T.cs
- Source:
- WeakReference.T.cs
Initializes a new instance of the WeakReference<T> class that references the specified object.
public:
WeakReference(T target);
public WeakReference (T target);
new WeakReference<'T (requires 'T : null)> : 'T -> WeakReference<'T (requires 'T : null)>
Public Sub New (target As T)
Parameters
- target
- T
The object to reference, or null
.
Applies to
WeakReference<T>(T, Boolean)
- Source:
- WeakReference.T.cs
- Source:
- WeakReference.T.cs
- Source:
- WeakReference.T.cs
Initializes a new instance of the WeakReference<T> class that references the specified object and uses the specified resurrection tracking.
public:
WeakReference(T target, bool trackResurrection);
public WeakReference (T target, bool trackResurrection);
new WeakReference<'T (requires 'T : null)> : 'T * bool -> WeakReference<'T (requires 'T : null)>
Public Sub New (target As T, trackResurrection As Boolean)
Parameters
- target
- T
The object to reference, or null
.
- trackResurrection
- Boolean
true
to track the object after finalization; false
to track the object only until finalization.
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: I hele 2024 udfaser vi GitHub-problemer som feedbackmekanisme for indhold og erstatter det med et nyt feedbacksystem. Du kan få flere oplysninger under:Indsend og få vist feedback om