Knowledge baseExam Center
ENEnglish
Choose language13

CKTIS / C#

System.Console: practical reference

System.Console: practical reference: Console exposes the process standard input, output, and error streams together with text-oriented operations.

Version: .NET API; verified on .NET 10.0.14

Syntax

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

Console exposes the process standard input, output, and error streams together with text-oriented operations.

Use it for command-line programs, local diagnostics, and output that callers can redirect from stdout or stderr.

Availability, encoding, and interactivity depend on the host, and WriteLine is not a substitute for durable structured logging.

ReadLine can return null at end of input, and redirected output may not support colors, cursor movement, or window properties.

The complete program actually uses System.Console; its exact expected stdout is CKTIS.

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("CKTIS");

Result

CKTIS

The complete program actually uses `System.Console`; its exact expected stdout is `CKTIS`.

Sources