База знанияИзпитен център
BGБългарски
Избери език13

CKTIS / C#

modules and boundaries: практическа справка

modules and boundaries: практическа справка: Assembly, namespace и проект организират кода и видимостта на зависимостите.

Версия: C# language and .NET 10 reference runtime

Синтаксис

// modules

Assembly, namespace и проект организират кода и видимостта на зависимостите.

Поддържайте съгласуван public API и минимални референции между модулите.

Namespace не е граница на сигурността, а public увеличава повърхността за съвместимост.

Циклични зависимости и конфликти на версии на assembly изискват препроектиране.

Пълната програма действително използва modules and boundaries; точният очакван stdout е System.Text.Json.

Примери

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;

Console.WriteLine(typeof(JsonSerializer).Namespace);

Резултат

System.Text.Json

Пълната програма действително използва `modules and boundaries`; точният очакван stdout е `System.Text.Json`.

Източници