Saturday, April 26, 2025

C# - Change Order of Parameters

using System;

namespace LearnCS
{
    class Program
    {

        static void NamedArguments(int x1, string x2, char x3) {
            Console.WriteLine("Integer: " + x1);
            Console.WriteLine("String: " + x2);
            Console.WriteLine("Char: " + x3);
        }

        static void NormalMethod(int x, int y, int z) {
            Console.WriteLine("1st: " + x);
            Console.WriteLine("2nd: " + y);
            Console.WriteLine("3rd: " + z);
        }

        static void Main(string[] args)
        {

            //NamedArguments(x3: 'Z', x1: 50, x2: "Some String");

            NormalMethod(5, 7, 9);

        }
    }
}

 

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 .  ...