title: Optional query string parameter passing to WCF service
body: <p>i want to know how to use:</p>
  
  <pre><code>string limit = WebOperationContext.Current.IncomingRequest.UriTemplateMatch.QueryParameters["Limit"];
  </code></pre>
  
  <p>in my wcf in this method:</p>
  
  <pre><code>CityNewsList GetNewsByCity(string DeviceType,string id,string limit);
  </code></pre>
  
  <p>here 'devicetype' and 'id' are default parameter and what i want is 'limit' as optional parameter means user have a choice to pass this parameter he can pass or can not pass this.</p>
  
  <p>want to use limit as:</p>
  
  <pre><code>if (limit == some value)
  {
      //do this.
  }
  if (limit == null)
  {
      // do this.
  }
  </code></pre>
  
  <p>i go through many links but i didn't get that how to use this in my wcf.</p>
  
  <p>or if someone can tell me how to make a parameter optional in the WCF Service.</p>