I have a method that has a dynamic parameter and returns a dynamic result. I would like to be able to pass null, int, string, etc into my method. 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
}