Static vs Non Static constructors
- by Neil N
I can't think of any reasons why one is better than the other. Compare these two implementations:
public class MyClass
{
public myClass(string fileName)
{
// some code...
}
}
as opposed to:
public class MyClass
{
private myClass(){}
public static Create(string fileName)
{
// some code...
}
}
There…