Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Feature Request] Add Vector2 and Vector3 etc. static class with const string to improve usage in switch expression #11385

Copy link
Copy link
Open
@DevTKSS

Description

@DevTKSS
Issue body actions

Type of issue

Other (describe below)

Description

Reading the System.Numerics docs of the Vectors 2+3 I did see there are Fields typed to int, but I would miss there a static class with const string to use them in a switch expression from the with net9.0 available lang features of C#

Currently I defined them locally with:

public static class VectorNames
{
    public const string X = "X";
    public const string Y = "Y";
    public const string Z = "Z";
    public const string W = "W";
}

but it would be great, if those would be already build in in same Namespace 🚀

Page URL

https://learn.microsoft.com/en-us/dotnet/api/system.numerics.vector2.x?view=net-9.0#system-numerics-vector2-x

Content source URL

https://github.com/dotnet/dotnet-api-docs/blob/main/xml/System.Numerics/Vector2.xml

Document Version Independent Id

cb627c62-5853-e375-b6a8-1bf5b8f35a9c

Platform Id

764f41aa-c7ca-092e-82cb-865f01ebc5d3

Article author

@dotnet-bot

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.