Click here to Skip to main content
15,882,163 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi,
what is the use of this statement
controller = BusinessController.CreateInstance();


please explain it
Posted
Updated 26-Dec-10 18:35pm
v2

The CreateInstance() is a static method (Probably, implements a SingleTone pattern to make sure that only one instance is used at the times across the application) which returns an instance of the BusinessController class.

This is usually done to encapsulate and simplify the object creation and initialization process from the client codes.
 
Share this answer
 
Comments
Kasson 27-Dec-10 0:54am    
Good Call
Refer Reflection in C# for more understanding of it.

Or and advice for you to read some books as you've also asked same sort of question again.
 
Share this answer
 
Without knowing what the BusinessController looks like, it difficult to know what is inside the class.

However, if the BusinessController is a class, it looks like an instance of some object is being created via a static method.

If this is an object instance, then another object instance is being created via this method.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900