Saturday, April 26, 2025

C# - Methods

using System;

namespace LearnCS
{
    class Program
    {
        static void JustPrinting() {
            Console.WriteLine("I am operation from method JustPrinting");
        }

        static void Multiplicator() {
            JustPrinting();
            JustPrinting();
            JustPrinting();
        }

        static void Main(string[] args)
        {
            Multiplicator();
            Addition();

        }

        static void Addition() {
            int x = 10;
            int y = 20;
            int z = x + y;

            Console.WriteLine("Result: " + z);
        }

    }
}

 

No comments:

Post a Comment

Tkinter Introduction - Top Widget, Method, Button

First, let's make shure that our tkinter module is working ok with simple  for loop that will spawn 5 instances of blank Tk window .  ...