METHOD
RuntimeHelpers.IsReferenceOrContainsReferences<T>
Reports whether T is a reference type or contains managed references. This is not a general blittability or native ABI compatibility test.
Formal Syntax & Structure
csharp syntaxcsharp
RuntimeHelpers.IsReferenceOrContainsReferences<T>()Working Example
Example Snippetcsharp
using System;using System.IO;using System.Collections.Generic;using System.Buffers;using System.Buffers.Binary;using System.Runtime.CompilerServices;using System.Threading;Console.WriteLine(RuntimeHelpers.IsReferenceOrContainsReferences<int>()); // False