final class · System
Boxed<T>
public final class Boxed<T>
What an any holds a function value or a pointer in (neither is an object of its own): any a = f; makes one,
(func<i32> : i32)a takes the value back out. It shows the value's type.
- Tipo
- final class
- Espacio de nombres
- System
- Ensamblado
- System.Core
- Acceso
- public, final
- Archivo fuente
Any.ant
Parámetros de tipo
| Nombre | Restricciones |
|---|---|
T | cualquier tipo |
Herencia
- Clases base
-
AnyBoxed<T>
Constructores
new(T Value, str type)
#
Métodos
override ToString() : str
#
Campos
readonly T Value
#
The function value or pointer.
Miembros privados e internos (1)
readonly str type
#
Miembros heredados (4)
GetTypemétodo de AnyUndescribedmétodo de AnyHashmétodo de Anydestroymétodo de Any
Código fuente
Boxed<T> en Antril, descompilado a partir de su Larva HIR.
// System.Boxed — System.Core (decompiled from Larva HIR)
into namespace System
{
/// What an `any` holds a function value or a pointer in (neither is an object of its own): `any a = f;` makes one,
/// `(func<i32> : i32)a` takes the value back out. It shows the value's type.
public final class Boxed<T>
{
readonly str type;
public:
/// The function value or pointer.
readonly T Value;
new(T Value, str type)
{
this.Value = Value;
this.type = type;
}
override ToString() : str => type;
}
}