/
aprogrammer
/
dotnet-docs
Обзор
Документация
Войти
/
aprogrammer
/
dotnet-docs
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
docs/csharp/tutorials/snippets/NullableIntroduction/SurveyQuestion.cs
17 строк
355 B
Bill Wagner
Retire the "What's new in C# 8" article (#32101)
02 ноя 2022, 17:06
Не верифицирован
02 ноя 2022, 17:06
2b52afd
Код
Авторство
О чём код?
namespace NullableIntroduction; public enum QuestionType { YesNo, Number, Text } public class SurveyQuestion { public string QuestionText { get; } public QuestionType TypeOfQuestion { get; } public SurveyQuestion(QuestionType typeOfQuestion, string text) => (TypeOfQuestion, QuestionText) = (typeOfQuestion, text); }