i am using the VB2008 IDE for C#.
my question may seem very basic but the solution is eluding me due to my lack of underastanding of classes and OOP programming i think.
i am using the following code on Form1.cs
Code:
private void button2_Click(object sender, EventArgs e)
{
textBox1.Text = Convert.ToString(addit(10, 21));
}
and have a new class.cs page with the following in it
Code:
namespace WindowsFormsApplication1
{
public class AdderClass
{
public int addit(int x, int y)
{
return (x + y);
}
public int subit(int x, int y)
{
return (x - y);
}
public int multit(int x, int y)
{
return (x * y);
}
}
}
why is the IDE saying that the name "addit" does not exist in the current context on Form1.cs ?
they both appear in the same namespace although on different code sheets.
i now this is something really simple that i am not getting the grasp of but it has eluded me up to now.