Knowledge baseExam Center
ENEnglish
Choose language13

CKTIS / C#

System.Type: practical reference

System.Type: practical reference: Type represents runtime type metadata, including generic definitions and members.

Version: .NET API; verified against .NET 10 reference surface

Syntax

System.Type /* select a documented member or constructor */

Type represents runtime type metadata, including generic definitions and members.

Use it for reflection, factories, and assignability checks.

Compare Type values or use IsAssignableFrom; a text name does not encode full assembly identity.

GetType(string) can return null; an open generic type cannot be instantiated normally.

The complete program actually uses System.Type; its exact expected stdout is True.

Examples

using System;
using System.Buffers;
using System.Collections.Concurrent;
using System.Collections.Frozen;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Text;
using System.Text.Json;
using System.Text.Json.Nodes;
using System.Text.Json.Serialization;
using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Channels;
using System.Threading.Tasks;
using Number = System.Int32;

Type type = typeof(Dictionary<string, int>);
Console.WriteLine(type.IsGenericType);

Result

True

The complete program actually uses `System.Type`; its exact expected stdout is `True`.

Sources