Skip to content

Selecting a Class In C# #2182

Open
Open
@Mark-Phillipson

Description

@Mark-Phillipson

In Visual Studio code unable to select a class in C#

Error Message: could not find containing class

Example Code:

public class Messages
{
    public string SendMessage(string message)
    {
        return message;
    }

}
SendMessage("testing")

Note it works perfectly well when there is a namespace:

namespace PacktexWebApp.Controllers
{
    public class Messages
    {
        public string SendMessage(string message)
        {
            return message;
        }

    }
    SendMessage("testing")
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinglang-c#

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions