Skip to content

Conversation

@Perksey
Copy link
Member

@Perksey Perksey commented Jun 22, 2020

Summary

Alters the FieldOffsetAttribute example to demonstrate its usage on a struct instead of a class.

@dotnet-bot dotnet-bot added this to the June 2020 milestone Jun 22, 2020
@gewarren
Copy link
Contributor

@jkoritzinsky I think that the use of "class" may be intentional. Can you weigh in? If we approve this PR, we'll also need to update the intro text at https://docs.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.fieldoffsetattribute?view=netcore-3.1#examples.

@jkoritzinsky
Copy link
Member

The text should say "struct or class" and the example can be either.

@Perksey
Copy link
Member Author

Perksey commented Jun 22, 2020

Wow, TIL. It's probably better to use struct in the snippet as in most cases that's where StructLayout et al will be used, and I'm willing to update the text to reflect that both could be used if it's desirable?

@jkoritzinsky
Copy link
Member

I would be OK updating the example to be a struct as long as the text is also updated.

@gewarren
Copy link
Contributor

@gewarren gewarren merged commit be30fc0 into dotnet:master Jun 22, 2020
@Perksey Perksey deleted the patch-1 branch June 23, 2020 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants