[Solved] Is there a way to add two numbers using a private constructor in C#


Here’s an example:

public class Example {
    public int Result {get; private set;}
    private Example(int x, int y){
       Result = x + y;
    }
    public static Example Create(int x, int y){
         return new Example(x,y);
    }   
}

solved Is there a way to add two numbers using a private constructor in C#