Napomena
Pristup ovoj stranici zahteva autorizaciju. Možete pokušati da se prijavite ili da promenite direktorijume.
Pristup ovoj stranici zahteva autorizaciju. Možete pokušati da promenite direktorijume.
'field': instance field types marked with StructLayout(LayoutKind.Explicit) must have a FieldOffset attribute.
When a struct is marked with an explicit StructLayout attribute, all fields in the struct must have the FieldOffset attribute. For more information, see StructLayoutAttribute Class.
The following sample generates CS0625:
// CS0625.cs
// compile with: /target:library
using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Explicit)]
struct A
{
public int i; // CS0625 not static; an instance field
}
// OK
[StructLayout(LayoutKind.Explicit)]
struct B
{
[FieldOffset(5)]
public int i;
}
Povratne informacije za .NET
.NET je projekat otvorenog koda. Izaberite vezu da biste pružili povratne informacije: