0

Hey everyone,

can someone tell me how to include other .cs files in my program? sort of like the .h files in C++ I guess. I want to be able to call functions from other .cs files.

Thanks

5
Contributors
5
Replies
6
Views
8 Years
Discussion Span
Last Post by ddanbe
0

Just add current form (.cs file) into your project then you can use function on that form.

0

If its in a different name space you would need to add a using at the top, otherwise no.

1

Another .cs file is definitly not the same as a .h file in C++.
You don't have to include using System; in your code, but then you have to write something like System.Console.WriteLine instead of Console.WriteLine.

Votes + Comments
Good thinking!!
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.