Rachit95 / google-api-for-dotnet

Automatically exported from code.google.com/p/google-api-for-dotnet
0 stars 0 forks source link

bug in GetStringIgnoreDefault function #8

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The if condition is incorrect.
The Function should look like this:

private static string GetStringIgnoreDefault(Enum value)
        {
            if (!Enum.IsDefined(value.GetType(), value))
                return null;

            return value.ToString();
        }

Original issue reported on code.google.com by wei...@gmail.com on 23 Nov 2008 at 2:09

GoogleCodeExporter commented 8 years ago
Hi weizd,

It's not a bug.
If you do not give a parameter of the request, it means the parameter is 
default value.
So I check the enum value, and return null if the value is default.

Thanks for your reporting. 

Original comment by iron9li...@gmail.com on 30 Nov 2008 at 10:37