How to use methods from other class

I am trying to create object of class that i have in my project. But its giving me error saying namespace not found.




Answer this question

How to use methods from other class

  • MortenBE

    Thank you very much...........

    I used the same thing.........



  • cdun2

    Include the project name in your class by using "using " statement. if it is in the same project try to rebuild. still u get the error, then close the IDE and reopen it. i hope now it will work properly.
  • Jon_V

    if its complaining about a different namespace or namespace not found then this means that the class in question has a different namespace than your current namespace, so either:

  • change the namespace of the class to be the same namespace as the project

  • import the other namespace in your using declerations at the top of your current class file (the one you are trying to call the other class from with a different namespace) or use the full path, something like:

    namespace.Class theClass = new namespace.Class();



  • MystMan

    Can you post the exact error message you get, and also relevant parts of your code



  • How to use methods from other class