Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Preventng direct creation of sub-class instances
Message
 
 
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Miscellaneous
Thread ID:
01141060
Message ID:
01141114
Views:
25
Cetin is right.
if you mark your constructor as either protected or private and provide a factory method (static) to get an instance of the object, it will solve you rproblem.

{
protected MyClass(){;}
public static MyClass getMyClass(param){return new MyClass();}
}
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform