title: how to check if a string value exists in ReportParameter list c#
body: <p>I have a ReportParameter list called <code>lstParam</code> with few values.</p>
  
  <pre><code>List&lt;ReportParameter&gt; lstParam = new List&lt;ReportParameter&gt;();
  ReportParameter rpm = new ReportParameter();    
  rpm.Name = "Department";
  rpm.Name = "Location";
  lstParam.Add(rpm);
  </code></pre>
  
  <p><strong>Note:</strong> <code>ReportParameter is used from reporting services rdlobject model</code></p>
  
  <p>Now I need to check if the list has a specific string value and the below code doesn't work for 'ReportParameter' list.</p>
  
  <pre><code>var matchingvalues = !lstParam.Where(stringToCheck =&gt; stringToCheck.Contains(stringValue));
  
  if (!lstParam.Any(str =&gt; str.Contains(stringValue)))
    { 
  
    }
  </code></pre>
  
  <p>Both the above statement didn't help and I get the below error.</p>
  
  <pre><code>'ReportParameter' does not contain a definition for 'Contains' and the best extension 
  method overload 'Queryable.Contains&lt;string&gt;(IQueryable&lt;string&gt;,string)' 
  requires a receiver of type 'IQueryable&lt;string&gt;'
  </code></pre>
  
  <p><strong>ReportParameter class:</strong></p>
  
  <pre><code>public class ReportParameter : ReportObject, INamedObject
  {
      public ReportParameter();
  
      [DefaultValue(false)]
      public bool AllowBlank { get; set; }
      public DataTypes DataType { get; set; }
      public DefaultValue DefaultValue { get; set; }
      [DefaultValue(false)]
      public bool Hidden { get; set; }
      [DefaultValue(false)]
      public bool MultiValue { get; set; }
      [XmlAttribute(typeof(string))]
      public string Name { get; set; }
      [DefaultValue(false)]
      public bool Nullable { get; set; }
      [ReportExpressionDefaultValueAttribute]
      public ReportExpression Prompt { get; set; }
      [DefaultValue("")]
      [XmlChildAttributeAttribute("Prompt", "LocID", "http://schemas.microsoft.com/SQLServer/reporting/reportdesigner")]
      public string PromptLocID { get; set; }
      [DefaultValue(UsedInQueryTypes.Auto)]
      public UsedInQueryTypes UsedInQuery { get; set; }
      public ValidValues ValidValues { get; set; }
  
      protected override bool RdlSemanticEqualsCore(ReportObject rdlObj, ICollection&lt;ReportObject&gt; visitedList);
  }
  </code></pre>
  
  <p>Really appreciate any suggestions.</p>