C# checking dynamic values against null
I have a method that has a dynamic parameter and returns a dynamic result.  I would like to be able to pass into my method null, int, string, etc.  However I get "NotSupportedException" in all situations.

    MyMethod(null); // Causes problems (Should resolve to ref type?)
    MyMethod(0); // Causes problems (Should resolve to int type)

    public dynamic MyMethod(dynamic b)
    {
      if (value != null) {...}// Throws NotSupportedExpception
      if (value != 0) {...} // Throws NotSupportedExpception
    }

Thanks,
aidesigner
C# checking dynamic values against null
===

I have a method that has a dynamic parameter and returns a dynamic result.  I would like to be able to pass into my method null, int, string, etc.  However I get "NotSupportedException" in all situations.

    MyMethod(null); // Causes problems (Should resolve to ref type?)
    MyMethod(0); // Causes problems (Should resolve to int type)

    public dynamic MyMethod(dynamic b)
    {
      if (value != null) {...}// Throws NotSupportedExpception
      if (value != 0) {...} // Throws NotSupportedExpception
    }

Thanks,
aidesigner