Skip to content

CS0112 re member modifier combinations #52122

@RexJaeschke

Description

@RexJaeschke

Type of issue

Missing information

Description

I'm working on the Ecma C# standard, on the V11 proposal for "static abstracts in interfaces," and while compiling some tests, I generated some CS0112 messages.

The help text for this error says

A static member 'function' cannot be marked as override, virtual or abstract

However, V11 added the ability for certain members in interfaces (methods, properties, events, and operators) to be static abstract and static virtual. As such, I propose that sentence be changed to something like the following:

A static member 'function' in a class or struct cannot be marked as override, virtual or abstract.

And optionally add

(Interface methods can be static abstract or static virtual.)

[Enter feedback here]

Page URL

https://learn.microsoft.com/en-us/dotnet/csharp/misc/cs0112?f1url=%3FappId%3Droslyn%26k%3Dk(CS0112)

Content source URL

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

Document Version Independent Id

d2e7dae8-5d78-8f95-4d34-d67ccf04256c

Platform Id

0cbfb6ff-828b-3c9b-67b8-00d244b258e8

Article author

@BillWagner

Metadata

  • ID: b8695673-9cef-cc40-54f6-80a9a21de312
  • PlatformId: 0cbfb6ff-828b-3c9b-67b8-00d244b258e8
  • Service: dotnet-csharp
  • Sub-service: errors-warnings

Related Issues

Metadata

Metadata

Assignees

Type

No type

Projects

Status

🔖 Ready

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions