8000 SYSTEM_INFO type in the FieldOffset example should be a struct (#4424) · CAndRyan/dotnet-api-docs@be30fc0 · GitHub
[go: up one dir, main page]

Skip to content

Commit be30fc0

Browse files
authored
SYSTEM_INFO type in the FieldOffset example should be a struct (dotnet#4424)
* SYSTEM_INFO type in the FieldOffset should be a struct * Update FieldOffsetAttribute.xml
1 parent f4f3902 commit be30fc0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

samples/snippets/csharp/VS_Snippets_CLR_Classic/classic FieldOffsetAttribute Example/CS/source.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
// <Snippet1>
55
[StructLayout(LayoutKind.Explicit)]
6-
public class SYSTEM_INFO
6+
public struct SYSTEM_INFO
77
{
88
[FieldOffset(0)] public ulong OemId;
99
[FieldOffset(8)] public ulong PageSize;

xml/System.Runtime.InteropServices/FieldOffsetAttribute.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
5858
5959
## Examples
60-
The following example demonstrates how to apply the <xref:System.Runtime.InteropServices.FieldOffsetAttribute> to members of a class with an explicit layout.
60+
The following example demonstrates how to apply the <xref:System.Runtime.InteropServices.FieldOffsetAttribute> to members of a struct or class with an explicit layout.
6161
6262
[!code-cpp[Classic FieldOffsetAttribute Example#1](~/samples/snippets/cpp/VS_Snippets_CLR_Classic/classic FieldOffsetAttribute Example/CPP/source.cpp#1)]
6363
[!code-csharp[Classic FieldOffsetAttribute Example#1](~/samples/snippets/csharp/VS_Snippets_CLR_Classic/classic FieldOffsetAttribute Example/CS/source.cs#1)]

0 commit comments

Comments
 (0)
0