/
aprogrammer
/
dotnet-docs
Обзор
Документация
Войти
/
aprogrammer
/
dotnet-docs
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
docs/csharp/tutorials/snippets/top-level-statements/Program.cs
28 строк
795 B
Bill Wagner
Use Collection expressions in C# Guide samples. This covers "Get Started" through "Tutorials" (#37919)
16 ноя 2023, 23:12
Не верифицирован
16 ноя 2023, 23:12
4c4be03
Код
Авторство
О чём код?
using MyNamespace; Console.WriteLine(); foreach(var s in args) { Console.Write(s); Console.Write(' '); } Console.WriteLine(); await Utilities.ShowConsoleAnimation(); string[] answers = [ "It is certain.", "Reply hazy, try again.", "Don’t count on it.", "It is decidedly so.", "Ask again later.", "My reply is no.", "Without a doubt.", "Better not tell you now.", "My sources say no.", "Yes – definitely.", "Cannot predict now.", "Outlook not so good.", "You may rely on it.", "Concentrate and ask again.", "Very doubtful.", "As I see it, yes.", "Most likely.", "Outlook good.", "Yes.", "Signs point to yes.", ]; var index = new Random().Next(answers.Length - 1); Console.WriteLine(answers[index]);