How can you use optional parameters in C#?

Posted by kurious on Stack Overflow See other posts from Stack Overflow or by kurious
Published on 2008-10-14T01:55:23Z Indexed on 2010/03/25 12:43 UTC
Read the original article Hit count: 271

Filed under:
|
|

We're building a web API that's programmatically generated from a C# class (the class has method "GetFooBar(int a, int b)" and the API has a method GetFooBar taking query params like &a=foo&b=bar.

The classes needs to support optional parameters, which isn't supported in C# the language. What's the best approach?

© Stack Overflow or respective owner

Related posts about c#

Related posts about api