Calling a function in another file

I'm trying to call a function in another file, I tried using filename.FunctionName() but it returns the following error when I try to build it:An object reference is required for the nonstatic field, method, or property

Suppose you have a project with a class that computes the average of 10 numbers. In a different file you already written a class "Add_numbers" that adds up numbers. What you can do here, and is, in my opinion, the logical thing to do, is to incorporate the class "Add_numbers" into your project. Go to File->Add Existing Item and select the project that containsthe class you want. Then select the class itself. This class in added in full to your project. Now you can access any method of this class by calling "Add_numbers.method_name". Voila.(do not forget to make an object of this class first).

Suppose you have a project with a class that computes the average of 10 numbers. In a different file you already written a class "Add_numbers" that adds up numbers. What you can do here, and is, in my opinion, the logical thing to do, is to incorporate the class "Add_numbers" into your project. Go to File->Add Existing Item and select the project that containsthe class you want. Then select the class itself. This class in added in full to your project. Now you can access any method of this class by calling "Add_numbers.method_name". Voila.(do not forget to make an object of this class first).

: : Hi: : Suppose you have a project with a class that computes the average of 10 numbers. In a different file you already written a class "Add_numbers" that adds up numbers. What you can do here, and is, in my opinion, the logical thing to do, is to incorporate the class : "Add_numbers" into your project. Go to File->Add Existing Item and select the project that contains: the class you want. Then select the class itself. : This class in added in full to your project. Now you can access any method of this class by calling "Add_numbers.method_name". Voila.(do not forget to : make an object of this class first). : : regards: yuval: