CKTIS / C#
strings and text: referencia práctica
strings and text: referencia práctica: Las cadenas .NET son secuencias inmutables de unidades de código UTF-16.
Versión: C# language and .NET 10 reference runtime
Sintaxis
// stringsLas cadenas .NET son secuencias inmutables de unidades de código UTF-16.
Elige explícitamente comparación, cultura, normalización y codificación en los límites.
Length no cuenta grafemas y concatenar con frecuencia puede asignar.
null, vacío, whitespace, surrogate y caracteres combinados son casos distintos.
El programa completo usa realmente strings and text; su stdout esperado exacto es HELLO, ADA!.
Ejemplos
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 name = "Ada"; Console.WriteLine($"Hello, {name}!".ToUpperInvariant());
Resultado
HELLO, ADA!
El programa completo usa realmente `strings and text`; su stdout esperado exacto es `HELLO, ADA!`.