ClearScript Library
ClearScript Library
ClearScript Library Reference
Microsoft.ClearScript
ValueRef<T> Class
ValueRef<T> Methods
ValueRef<T> Fields

# ValueRef T Class

Holds a value on the heap.
Inheritance Hierarchy
SystemObject
Microsoft.ClearScriptValueRefT
Namespace: Microsoft.ClearScript
Assembly: ClearScript.Core (in ClearScript.Core.dll) Version: 7.5.0
Syntax
C#
VB
C++
F#
Copy

    public class ValueRef<T>
    where T : struct, new()

    Public Class ValueRef(Of T As {Structure, New})

    generic<typename T>
    where T : value class, gcnew()
    public ref class ValueRef

    type ValueRef<'T when 'T : struct, new()> = class end

#### Type Parameters

T
  The value type.

The ValueRefT type exposes the following members.

Methods

| Name | Description
--- | --- | ---
| Equals | Determines whether the specified object is equal to the current object. (Inherited from Object)
| Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object)
| GetHashCode | Serves as the default hash function. (Inherited from Object)
| GetType | Gets the Type of the current instance. (Inherited from Object)
| MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object)
| ToString | Returns a string that represents the current object. (Inherited from Object)

Top
Fields

| Name | Description
--- | --- | ---
| Value | The value currently held by the ValueRefT instance.

Top
Remarks
This utility class can be used for passing mutable values to asynchronous methods.
See Also

#### Reference

Microsoft.ClearScript Namespace

Copyright © Microsoft Corporation. All rights reserved.

Send comments on this topic to Microsoft