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

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions