Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

terminology for what a class does with generic type parameter

Tags:

c#

.net

generics

Given class MyClass<T> what is the proper terminology to describe what MyClass does with the generic type parameter?

Implements? Uses? These don't sound right. I've skimmed through MS documentation on generics and they seem to talk around it without using a term.

My question came to mind when writing a comment about code that inspected the type of generic type parameter to see if it was assignable from a particular base type. I was planning to say something like: "check to see if the generic class verbs the specified type". I can word it differently, but wanted to know if there was a good verb to use.

like image 514
jltrem Avatar asked Jan 28 '26 12:01

jltrem


1 Answers

The T parameter is part of the type, so you should just say MyClass of T. It "does" nothing with T.

like image 130
Gerrie Schenck Avatar answered Jan 31 '26 00:01

Gerrie Schenck