CKTIS / C#
System.Enum: practical reference
System.Enum: practical reference: Enum provides operations for named integral constants and their metadata.
Version: .NET API; verified on .NET 10.0.14
Syntax
System.Enum /* select a documented member or constructor */Enum provides operations for named integral constants and their metadata.
Use Parse or TryParse, GetValues, and IsDefined at text boundaries and for enum inspection.
Parse can accept an unnamed numeric value, while Flags requires intentional powers of two and an explicit Flags attribute.
IsDefined does not accept every Flags combination, and Parse case sensitivity depends on its parameter.
The complete program actually uses System.Enum; its exact expected stdout is Friday.
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;
Console.WriteLine(Enum.Parse<DayOfWeek>("Friday"));
Result
Friday
The complete program actually uses `System.Enum`; its exact expected stdout is `Friday`.