Skip to content

Build error when using certain method names #2821

@timcassell

Description

@timcassell

Example benchmark method:

[Benchmark] public void System() { }

Fails with

error CS0119: 'Benchmarks.System()' is a method, which is not valid in the given context

We should use base.MethodName for instance methods, or <FullyQualifiedTypeName>.MethodName for static methods, rather than the simple MethodName. And qualify all types with global::

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions