Passing parameters to an anonymous method using an action in C#
<p>We are still having problems passing a parameter to an action. Here's what we have so far:</p>

<pre><code>public ActionResult Create(string ds) {
            HandleException(new Action&lt;string, ref System.Web.Mvc.ModelState&gt;(ds,ModelState) =&gt; {
                InitializeServices(ds, "0000");
                vm.Account = new Account {
                        PartitionKey = "0000",
                        RowKey = "0000",
                        Created = DateTime.Now,
                        CreatedBy = User.Identity.Name
                };
            }); 
            return View("CreateEdit", vm);
        }

    private void HandleException(Action action) {
        try { 
            action(); 
        } 
        catch (ServiceException ex) { 
            ModelState.Merge(ex.Errors); 
        } 
        catch (Exception e) 
        { 
            Trace.Write(e); 
            ModelState.AddModelError("", "Database access error: " + e.Message); 
        } 
    } 
</code></pre>

<p>This gives 12 syntax errors and most are pointing to the line: </p>

<pre><code>HandleException(new Action&lt;string, 
</code></pre>

<p>We have also have syntax errors saying that "ref" is not the correct syntax</p>
