views:

162

answers:

1

The entire solution builds fine in Visual Studio, but when I run the Nant script to compile the website I get several errors on this line:

string[] qs = (Request.QueryString["e"] ?? String.Empty)
               .Split(new[] { '?' }, StringSplitOptions.RemoveEmptyEntries);

First one says Type Expected, then Syntax error (value expected), ) expected, ; expected, etc. I've used lines like this before in the project and it doesn't seem to complain on those ones.

I'm pretty sure the error is coming from calling Split on that conditional statement, but I'm not sure why.

+8  A: 

I suggest trying

string[] qs = (Request.QueryString["e"] ?? String.Empty)
    .Split(new char[] { '?' }, StringSplitOptions.RemoveEmptyEntries);

Note that new[] went to new char[].

mquander
Curse you, ReSharper. Thanks, that worked.
Brandon