ECMA-334 C# Language Specification25.5: Pointers in expressions |
In an unsafe context, an expression may yield a result of a pointer type, but outside an unsafe context it is a compile-time error for an expression to be of a pointer type. In precise terms, outside an unsafe context a compile-time error occurs if any simple-name
(14.5.2), member-access
(14.5.4), invocation-expression
(14.5.5), or element-access
(14.5.6) is of a pointer type.
In an unsafe context, the primary-no-array-creation-expression
(14.5) and unary-expression
(14.6) productions permit the following additional constructs:
...
pointer-member-access
pointer-element-access
sizeof-expression
...
pointer-indirection-expression
addressof-expression
[Note:
The
precedence
and
associativity
of
the
unsafe operators
is implied
by
the
grammar.
end
note]
In This Section: