In what instances you will declare constructor to be private, DOT NET Programming

When we create a private constructor, we can not create object of the class directly from the client. So you will use the private constructors whenever you do not want instances of the class to be created by any external client. For example the UTILITY functions in project will have no instance and be used without creating instance, as creating instances of the class would be a waste of memory.

Posted Date: 9/22/2012 3:24:49 AM | Location : United States







Related Discussions:- In what instances you will declare constructor to be private, Assignment Help, Ask Question on In what instances you will declare constructor to be private, Get Answer, Expert's Help, In what instances you will declare constructor to be private Discussions

Write discussion on In what instances you will declare constructor to be private
Your posts are moderated
Related Questions
What is different overloading and overriding, please explain

What is the difference between the Clone() and Copy() methods of the DataSet class? The Clone() method copies only the structure of a DataSet. The copied structure having all t

Project Description: College erp Erp key features: Panacea ERP Online Suite is server based college based management software. Gives Password facility for different use

Describe the various components in sequence diagrams. Object lifeline: - It shows the lifetime of an object creation and its destruction. If the object is created or des

Describe the services that UDDI provides to Web applications. UDDI gives the following types of services to a Web application: XML Schema for business descriptions - Contain

How can we implement singleton pattern in .NET ? The Singleton pattern basically focuses on having one and only one instance of the object running. Lets take an e.g. a windows

Question 1 Discuss the following with respect to .NET Technologies Web Applications Web Server Connections Question 2 Write a sample program using ASP.NET explain

Question: (a) Define four special target names use with the TARGET attribute. (b) Assume that you have a document with many subsections. Write the HTML code to create a fr

What is UML? The Unified Modeling Language (UML) is a graphical language for documenting, specifying, visualizing,  constructing, and  the artifacts of a software-intensive sys

Question 1 Discuss the following with respect to .NET Technologies Web Applications Web Server Connections Question 2 Write a sample program using ASP.NET explain