In a LINQ to SQL statement I've got a column name in the database that's also a C# keyword (void). How do I get the compiler to treat this as an object property and not the keyword?
I could re-write this in with the method notation, sure, but there's got to be a way to give the compiler a hint here...
var p = from c in mytable
where c.id = rowNumber
select ( new { voidedState = c.void } ); // <--- Problem is here
The error is:
Identifier expected; 'void' is a keyword
I can't argue with that, I'm just looking for a workaround.
Thanks.