If you type SPSecurity, Visual Studio 2010's intellisense does not recognize it as a valid object, but once you type the entire line out, Visual Studio won't add the red underlined squiggle line indicating a syntax error. This is because when creating sandboxed solutions, you are still building against the full Sharepoint Object Model, but Visual Studio uses a different intellisense file to help the developer know which objects they will not have access to when the component runs in the sandboz.
Your sandboxed solution cannot include a reference to the SPSecurity type. If you use similar to following syntax
SPSecurity.RunWithElevated Priviliges(delegate
{
//Your Code
});
You show the error like
