Skip to content

Build error when using certain method names #2821

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::

Activity

  1. User0332 commented on Dec 8, 2025

    @User0332
    Contributor

    If you want to work on this see my comment at the bottom of #2897

  2. added a commit that references this issue on Dec 9, 2025
    de52812
  3. added this to the v0.16.0 milestone on Dec 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions