Wednesday, November 27, 2013

Example of Singleton pattern

    public class sing
    {
        private static sing Sing;

        private sing()
        {

        }

        public int x;
        public int y;
        public static sing SING
        {
            get
            {
                if (Sing == null)
                {
                    Sing = new sing();
                }
                return Sing;
            }
        }

    }


static void Main(string[] args)
        {

            sing.SING.x = 7;

            Console.WriteLine(sing.SING.x.ToString());

Thursday, November 21, 2013

still getting excel save prompt with automation

tried these 2 ideas

  object misValue = System.Reflection.Missing.Value;
                        workBook.Saved = true;
                        workBook.Close(false, misValue, misValue);

Tuesday, November 19, 2013

This document is opened by another project

i was getting this message on a class - I had added a member class to the class and it was being picked up in only some locations - somehow there was a connection

my advice - close VS - even compiling solution did not help

Thursday, November 14, 2013