Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lernen Herausforderung: Array-Deklaration | Arrays
C# Grundlagen
course content

Kursinhalt

C# Grundlagen

C# Grundlagen

1. Erste Schritte
2. Umgang mit Datentypen
3. Kontrollstrukturen
4. Schleifen
5. Arrays
6. Methoden

book
Herausforderung: Array-Deklaration

Erstellen Sie ein leeres Array namens heights vom Typ float und der Länge (Größe) von 7.

cs

main

copy
12345678910111213
using System; namespace ConsoleApp { internal class Program { static void Main(string[] args) { // Declare an array below this line ___ } } }

Die Syntax zur Deklaration eines leeren Arrays ist datatype[] arrayName = new datatype[size];.

cs

main

copy
12345678910111213
using System; namespace ConsoleApp { internal class Program { static void Main(string[] args) { // Declare an array below this line float[] heights = new float[7]; } } }

War alles klar?

Wie können wir es verbessern?

Danke für Ihr Feedback!

Abschnitt 5. Kapitel 2
We're sorry to hear that something went wrong. What happened?
some-alt