I understand T
comes from Type
, but why is it that the next variable often used is K
?
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Generic Generics in Managed C++
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
I've seen
K
used forKey
but not frequently as the "next" type parameter. For example, you'll seewhere
K
is forKey
andV
is forValue
.Sometimes you'll see
T1
,T2
, etc. orT
,U
,V
(the former is preferred here). But I prefer more descriptive names likeor
One more variation is the
GenericFunction<T1,T2,TResult>
, where TResult is the type of value returned by the functon. (as in,Func<T1,T2,...,TResult>
)My guess would be that it's from
Key
.