It will also compare the values that will set in first instance and use in second instance.
mathUtilInstance1.FirstInput = 1;
mathUtilInstance1.SecondInput = 2;
Console.WriteLine("Addition Value from Second Instance: {0}", mathUtilInstance1.Add());
static void Main(string[] args)
{
MathUtility mathUtilInstance1 = MathUtility.Instance;
mathUtilInstance1.FirstInput = 1;
mathUtilInstance1.SecondInput = 2;
Console.WriteLine("Addition Value from First Instance: {0}", mathUtilInstance1.Add());
MathUtility mathUtilInstance2 = MathUtility.Instance;
Console.WriteLine("Addition Value from Second Instance: {0}", mathUtilInstance1.Add());
if (mathUtilInstance1 == mathUtilInstance2)
{
Console.WriteLine("Both Instance are equal");
}
Console.ReadLine();
}