RuntimeHelpers.IsReferenceOrContainsReferences<T> Method
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.
Returns a value that indicates whether the specified type is a reference type or a value type that contains references or by-refs.
public:
generic <typename T>
static bool IsReferenceOrContainsReferences();
public static bool IsReferenceOrContainsReferences<T> ();
static member IsReferenceOrContainsReferences : unit -> bool
Public Shared Function IsReferenceOrContainsReferences(Of T) () As Boolean
Type Parameters
- T
The type.
Returns
true
if the given type is a reference type or a value type that contains references or by-refs; otherwise, false
.
Remarks
Prior to .NET 9, this API doesn't support types that can contain by-refs.
Applies to
Bekerjasama dengan kami di GitHub
Sumber untuk kandungan ini boleh didapati di GitHub, di mana anda juga boleh mencipta dan menyemak isu dan menarik permintaan. Untuk maklumat lanjut, lihat panduan penyumbang kami.