dotnet / dotnet/dotnet-api-docs

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

Open
#11,385 1 comment 0 reactions 0 assignees View on GitHub
area-System.Numerics untriaged
Dominant language
C#
Stars
949
Forks
1.7k
Avg merge
3d 27m
Merged PRs (30d)
49

Description

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

```csharp
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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.