DEV Community

Discussion on: Ever been stumped by <E>, <T>, <K, V> in OO language documentation?

Collapse
 
creativ_bracket profile image
Jermaine

I don't have a solid reason as to why multi-letter words are not used, apart from the fact that its more characters and therefore not conventional. Consequently, this could be mistaken for actual rather than placeholder types.

Collapse
 
garfbradaz profile image
Gareth Bradley

In C# you see multi element words, like TElement or TEntity for example.

Thread Thread
 
creativ_bracket profile image
Jermaine

Yeah you're right. I had seen that in the docs. It's still got the placeholder letter as prefix:

public interface ISessionChannel<TSession>
{
    TSession Session { get; }
}

docs.microsoft.com/en-us/dotnet/cs...