I thought that when your method is public you could invoke it from any class in your project...
namespace MethodTest
{
class Program
{
public static void Foo()
{
}
static void Main(string[] args)
{
Foo();
}
}
class MyClass
{
public static void asd(string[] args)
{
Foo();
}
}
}
However when I try to invoke it from an other class I get an error
Error CS0103 The name 'Foo' does not exist in the current context MethodTest D:\Visual Studio\MethodTest\MethodTest\Program.cs 23 Active PS: And as I know if miss the access modifier it is private... Am I correct?