❔ How to import different classes to main file.
hello, i have a question, i'm a beginner in C# and a try to split my program in different classes, now i making a simple calculator without graphic interface, and i can't split my program in 2 classes, one with basics operations and the main class with main method, my question is what i can import my basic operations class to my main class? ps: https://github.com/devv-thiago/calculadora_CMD
GitHub
GitHub - devv-thiago/calculadora_CMD
Contribute to devv-thiago/calculadora_CMD development by creating an account on GitHub.
2 Replies
You don't import classes, you import namespaces
And only if needed
If two classes are in the same namespace you can just... use them
will just work, because same namespace
If the namespace is different, then you need to use the
using
directive
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.