/
aprogrammer
/
dotnet-docs
Обзор
Документация
Войти
/
aprogrammer
/
dotnet-docs
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
docs/csharp/language-reference/compiler-messages/snippets/array-warnings/Program.cs
25 строк
615 B
Bill Wagner
Consolidate compiler errors and warnings on arrays into a single file (#36881)
31 авг 2023, 21:23
Не верифицирован
31 авг 2023, 21:23
882f311
Код
Авторство
О чём код?
// See https://aka.ms/new-console-template for more information Console.WriteLine("Hello, World!"); // <ArrayDeclarations> int[] anArrayOfIntegers; string[,,] threeDimensionalStringArray; // </ArrayDeclarations> // <ArrayInitializers> int[] fiveIntegers = new int[5]; string[] weekDays = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" }; // </ArrayInitializers> // <ImplicitInitializer> var implicitType = new[] { 1, 2, 3 }; char c = 'c'; short s1 = 0; short s2 = -0; short s3 = 1; short s4 = -1; // common type is "int" var commonType = new[] { s1, s2, s3, s4, c, 1 }; // </ImplicitInitializer>