Example #1
0
        public static MyfabClass GiveMeInstance()
        {
            if (myclassinstance == null)
            {
                myclassinstance            = new MyfabClass();
                myclassinstance.identifier = Guid.NewGuid().ToString();
            }

            return(myclassinstance);
        }
Example #2
0
        static void Main(string[] args)
        {
            MyfabClass class1 = MyfabClass.GiveMeInstance();

            MyfabClass class2 = MyfabClass.GiveMeInstance();

            Console.WriteLine(class1.identifier);

            Console.WriteLine(class2.identifier);

            Console.ReadLine();
        }