CKTIS / C#
System.Reflection.Assembly: praktična referenca
System.Reflection.Assembly: praktična referenca: Assembly predstavlja naloženo enoto kode in metapodatkov .NET.
Različica: .NET API; verified against .NET 10 reference surface
Sintaksa
System.Reflection.Assembly /* select a documented member or constructor */Assembly predstavlja naloženo enoto kode in metapodatkov .NET.
Uporabite za pregled tipov, virov in imena trenutnega assembly.
Dinamično nalaganje tvega izvajanje kode in spore med konteksti nalaganja.
Location je lahko prazen, GetTypes pa lahko sproži ReflectionTypeLoadException.
Celoten program dejansko uporabi System.Reflection.Assembly; natančno pričakovani stdout je System.Private.CoreLib.
Primeri
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;
var assembly = typeof(string).Assembly;
Console.WriteLine(assembly.GetName().Name);
Rezultat
System.Private.CoreLib
Celoten program dejansko uporabi `System.Reflection.Assembly`; natančno pričakovani stdout je `System.Private.CoreLib`.