ジェネリック型を作成するにはどうすればよいですかaccepts only a type of Integer, Long and String.
単一のクラスの型を制限したり、以下のコードでインターフェースを実装したりできることはわかっています
public class MyGenericClass<T> where T:Integer{ }
またはint、longを処理しますが、文字列は処理しません
public class MyGenericClass<T> where T:struct
Integer、Long、および String の型のみを受け入れるジェネリックを作成することは可能ですか?