I have some code like this:
[AcceptVerbs(HttpVerbs.Post)] public ActionResult Save([Bind(Prefix='')]Person person) { String s = person.property; /* ... */ }
But it throws the error: ‘Cannot use local variable ‘person’ before it is declared’.
What simple thing am I missing?
Okay, this is just some really bizarre error – if the variable is named a particular name it does not work, for any other name it does work…