-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Closed
Labels
📌 seQUESTeredIdentifies that an issue has been imported into Quest.Identifies that an issue has been imported into Quest.dotnet-csharp/svcin-prThis issue will be closed (fixed) by an active pull request.This issue will be closed (fixed) by an active pull request.lang-reference/subsvcokr-freshnessOKR: Freshness of contentOKR: Freshness of content
Description
Type of issue
Missing information
Description
These declarations are both legal:
public record class C(int X)
{
public int X = X; // effectively this.X = X
}
public record struct S(int X)
{
public int X = X; // effectively this.X = X
}This article only talks about "properties", which is the default for a record's primary constructor parameter. It should include how to create a public field as well.
Page URL
https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/record
Content source URL
https://github.com/dotnet/docs/blob/main/docs/csharp/language-reference/builtin-types/record.md
Document Version Independent Id
de1f383b-ef20-4776-57a8-04edae892166
Article author
Metadata
- ID: 20818c64-4ad8-fb15-5d79-e7f98614e9c4
- Service: dotnet-csharp
- Sub-service: lang-reference
Metadata
Metadata
Assignees
Labels
📌 seQUESTeredIdentifies that an issue has been imported into Quest.Identifies that an issue has been imported into Quest.dotnet-csharp/svcin-prThis issue will be closed (fixed) by an active pull request.This issue will be closed (fixed) by an active pull request.lang-reference/subsvcokr-freshnessOKR: Freshness of contentOKR: Freshness of content