Skip to content

Consider an example using const #48254

@BillWagner

Description

@BillWagner

Type of issue

Missing information

Description

From anonymous feedback:

const declarations are classified as const expressions not variables. One of the examples should show that assigning to a const value produces this error.

Page URL

https://learn.microsoft.com/en-us/dotnet/csharp/misc/cs0131

Content source URL

https://github.com/dotnet/docs/blob/main/docs/csharp/misc/cs0131.md

Document Version Independent Id

0c6322ca-0893-5a9b-3227-57356647e9bf

Platform Id

afb03cc5-8ca6-3444-18b3-084bedf52f79

Article author

@BillWagner

Metadata

  • ID: 4d351870-408e-572c-8ad9-a123b3bcff09
  • PlatformId: afb03cc5-8ca6-3444-18b3-084bedf52f79
  • Service: dotnet-csharp
  • Sub-service: errors-warnings

Related Issues


Associated WorkItem - 486868

Metadata

Metadata

Assignees

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions