<pre><code>  ArrayList filters = new ArrayList();
  filters.Add(new string[] { "Name", "Equals", "John" });


  ObjectDataSource1.SelectParameters.Add("AppliedFilters", 
           string.Join(",",(string[])filters.ToArray(typeof(string))));
</code></pre>

<p>Am trying to add a parameter to my object data source which is bound to my select method which should accept a string[]. But as the SelectParameters.Add takes in (string,string) or the other 3 overloads which do not seem to function for me correctly. </p>

<p>The select method accepts a string param though i prefer it accept a string[] or arraylist, but for now I can live with accepting a string which i should convert back to string[]</p>

<p>Resolution:
followed this article <a href="https://stackoverflow.com/questions/235166/how-do-i-set-up-objectdatasource-select-parameters-at-runtime">link text</a></p>

<p><strong>Closed</strong> as duplicate of the question referenced above.</p>

A somewhat obvious one: always redefine
```
respond_to?
```
if you redefine
```
method_missing
```
.  If
```
method_missing(:sym)
```
works,
```
respond_to?(:sym)
```
should always return true.  There are many libraries that rely on this.
Later:
An example:
```
```
# Wrap a Foo; don't expose the internal guts.
# Pass any method that starts with 'a' on to the
# Foo.
class FooWrapper
  def initialize(foo)
    @foo = foo
  end
  def some_method_that_doesnt_start_with_a
    'bar'
  end
  def a_method_that_does_start_with_a
    'baz'
  end
  def respond_to?(sym, include_private = false)
    pass_sym_to_foo?(sym) || super(sym, include_private)
  end
  def method_missing(sym, *args, &block)
    return foo.call(sym, *args, &block) if pass_sym_to_foo?(sym)
    super(sym, *args, &block)
  end
  private
  def pass_sym_to_foo?(sym)
    sym.to_s =~ /^a/ && @foo.respond_to?(sym)
  end
end

class Foo
  def argh
    'argh'
  end
  def blech
    'blech'
  end
end

w = FooWrapper.new(Foo.new)

w.respond_to?(:some_method_that_doesnt_start_with_a)
# => true
w.some_method_that_doesnt_start_with_a
# => 'bar'

w.respond_to?(:a_method_that_does_start_with_a)
# => true
w.a_method_that_does_start_with_a
# => 'baz'

w.respond_to?(:argh)
# => true
w.argh
# => 'argh'

w.respond_to?(:blech)
# => false
w.blech
# NoMethodError

w.respond_to?(:glem!)
# => false
w.glem!
# NoMethodError

w.respond_to?(:apples?)
w.apples?
# NoMethodError
```
```