Notiz
Zougrëff op dës Säit erfuerdert Autorisatioun. Dir kënnt probéieren, Iech unzemellen oder Verzeechnesser ze änneren.
Zougrëff op dës Säit erfuerdert Autorisatioun. Dir kënnt probéieren, Verzeechnesser ze änneren.
Cannot take the address of the given expression
You can take the address of fields, local variables, and indirection of pointers, but you cannot take, for example, the address of the sum of two local variables. For more information, see Unsafe Code and Pointers.
The following sample generates CS0211:
// CS0211.cs
// compile with: /unsafe
public class MyClass
{
unsafe public void M()
{
int a = 0, b = 0;
int *i = &(a + b); // CS0211, the addition of two local variables
// try the following line instead
// int *i = &a;
}
public static void Main()
{
}
}
Feedback zu .NET
.NET ass en Open-Source-Projet. Wielt e Link, fir Feedback ze ginn: