I have code like this:
using System;
using System.Collections.Generic;
using System.Text;
namespace fundamentalsmethod
{
class Test {
public int a, b;
public Test(int i, int j)
{
a = i;
b = j;
}
public int change(int c)
{
c = a + b;
return c;
}
}
class Program
{
public static void Main(string[] args)
{
int val;
val = int.Parse
(System.Configuration.ConfigurationManager.AppSettings["MyValue"]);
Test ob = new Test(12,13);
ob.change(val);
Console.WriteLine(ob.change(val));
}
}
}
If i want teh sum of 30, 40 i need to change the values every time
from 12, 13 to 30. 40 what is the best way to avoid this hard code and
get the sum of any 2 nums.