Skip to content

Allow VB to consume extension properties #78901

@chucker

Description

@chucker

Is your feature request related to a problem? Please describe.

I would like to use C# 14's extension properties, e.g.

var s = "";
Console.WriteLine(s.IsFancy);

public static class StringExtensions
{
    extension(string s)
    {
        public bool IsFancy => true;
    }
}

…but then also to consume them in VB.

However, while VB does see extension methods even when they're in the new extension container syntax, it doesn't appear to see extension properties.

Describe the solution you'd like

It would be great if extension properties simply showed up in IntelliSense.

It would also be workable if VB merely saw methods, i.e. string.get_IsFancy in the above case, although the syntax wouldn't be quite as nice for a setter.

Additional context

For now, I'll manually write method wrappers so the extension properties can sort of be accessed from VB.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions