rksoftware

Visual Studio とか C# とかが好きです

(プレビュー機能) 汎用属性 - C# 2.0 以降の新機能まとめ (C# 10.0 ~ ) (途中)

■ C# 10.0 での新機能

・汎用属性 (Generic attributes)
  https://docs.microsoft.com/ja-jp/dotnet/csharp/programming-guide/generics/generics-and-attributes
 属性クラスでジェネリクスが使える。

[Sample<int>]
void Method() {; }

class SampleAttribute<T> : System.Attribute { }