Nota
Capaian ke halaman ini memerlukan kebenaran. Anda boleh cuba mendaftar masuk atau menukar direktori.
Capaian ke halaman ini memerlukan kebenaran. Anda boleh cuba menukar direktori.
Implicitly typed locals cannot be fixed
Implicitly typed local variables and anonymous types are not supported in the fixed
context.
- Either remove the
fixed
modifier from the variable or else give the variable an explicit type.
The following code generates CS0821:
class A
{
static int x;
public static int Main()
{
unsafe
{
fixed (var p = &x) { }
}
return -1;
}
}
.NET maklum balas
.NET ialah projek sumber terbuka. Pilih pautan untuk memberikan maklum balas: