1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Private Constructor

Discussion in 'C#' started by sharmila, May 4, 2009.

Thread Status:
Not open for further replies.
  1. sharmila

    sharmila New Member

    Joined:
    Mar 24, 2006
    Messages:
    75
    Likes Received:
    1
    Trophy Points:
    0
    How to invoke a function in a class which is having private constructor.

    Eg:
    Code:
    class A
    {
         private A(){}
         public void fun(int a )
         {
                  ...................
                  .................
          }
    };
    In this example if we want to invoke fun(int), how can we do that?
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,292
    Likes Received:
    365
    Trophy Points:
    83
    You already have a discussion going at Private Constructors. Please do not create the same thread over and over again,
     
Thread Status:
Not open for further replies.

Share This Page