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

Зміст курсу

C# Basics

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

Все було зрозуміло?

Секція 6. Розділ 3
We're sorry to hear that something went wrong. What happened?
some-alt