I need help with C# programming; I am new to it and I come from C background. I have a Console Application like this:
using System;
using System.Collections
You should either make your Add function static like so:
static public int Add(int x, int y)
{
int result = x + y;
return result;
} //END Add
static means that the function is not class instance dependent. So you can call it without needing to create a class instance of Program class.
or you should create in instance of your Program class, and then call Add on this instance. Like so:
Program prog = new Program();
prog.Add(5,10);