• Post Reply Bookmark Topic Watch Topic
  • New Topic

Generic Method Declaration

 
Clay Chow
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Would it ever be possible to see a generic method declartion that looks like K<K>. I have tried and not been able to get one to compile. For example:



Also, I do not fully understand why this will not compile.

 
Campbell Ritchie
Marshal
Posts: 53140
124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"K<K>"

That looks very peculiar. List<K> would look more likely.
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!