Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Methods Creation Practice | Methods
C# Basics
course content

Conteúdo do Curso

C# Basics

C# Basics

1. Getting Started
2. Dealing with Data Types
3. Control Structures
4. Loops
5. Arrays
6. Methods

Methods Creation Practice

Following is a code for outputting a triangle shape using multiple Console.WriteLine statements:

cs

main

Create a new method called displayTriangle with the above code and call it in the main function.

cs

main

  1. Create a method using static void methodName() syntax and put the triangle code inside it. Afterwards, execute it in the main method.
cs

main

Tudo estava claro?

Seção 6. Capítulo 3
We're sorry to hear that something went wrong. What happened?
some-alt