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,375
    Likes Received:
    388
    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

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice