Applied to a generic type parameter C# with Example



Applied to a generic type parameter C# with Example

Snippet 
public class SomeClass 
{ 
public void PrintTypeName() 
{ 
Console.WriteLine(nameof(TItem)); 
} 
} 
 

... 
var myClass = new SomeClass(); 
myClass.PrintTypeName(); 
Console.WriteLine(nameof(SomeClass)); 
Console Output 
TItem 
SomeClass 

0 Comment's

Comment Form

Submit Comment