0

I have two variables, ns and method storing the namespace and a method name for working with an api. I have an api library, where once you have an instance, you access the methods as api.namespace.method()

How do I go about checking for the existance of namespace and method with the api object from the variables? At the moment I'm switching over the variables but of course, this doesn't scale too well!

user3791372
  • 4,445
  • 6
  • 44
  • 78
  • Possible duplicate of [C# - How to check if namespace, class or method exists in C#?](http://stackoverflow.com/questions/8499593/c-sharp-how-to-check-if-namespace-class-or-method-exists-in-c) – Amey Khadatkar Oct 19 '15 at 09:17
  • 1
    Method should be inside a type in c#. You can't have method directly in namespace. – Sriram Sakthivel Oct 19 '15 at 09:18

0 Answers0