Note
This method returns a value by reference. If this library is used by an older compiler that does not support such members,
use the indexer instead.
public ref T GetElementReference(
int y,
int x
)
Public Function GetElementReference (
y As Integer,
x As Integer
) As T
public:
T% GetElementReference(
int y,
int x
)
member GetElementReference :
y : int *
x : int -> 'T
Though this method does not validate the coordinates separately, it does not allow indexing beyond the Length of the underlying Buffer. To omit also the length check, allowing to get the reference to any element in the whole UnderlyingArray, use the GetElementReferenceUnchecked method instead.
IndexOutOfRangeException | The specified indices refer to an item outside the bounds of the underlying Buffer. |
VerificationException | .NET Framework only: you execute this method in a partially trusted AppDomain that does not allow executing unverifiable code. |