Saturday, April 26, 2025

C# OO - Objects and Classes

using System;

namespace LearnCS
{
    class Program
    {
        string x = "Generic Characteristic";

        static void Outsider()
        {
            Program generic = new Program();
            Console.WriteLine(generic.x);
        }

        static void Main(string[] args)
        {

            Program firstObject = new Program();
            Console.WriteLine(firstObject.x);

            Program secondObject = new Program();
            Console.WriteLine(secondObject.x);

            Outsider();

            Console.ReadLine();
        }
    }
}

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