Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. public void Test<T>(T param, Action<T> callback)
  2. {
  3.  
  4. }
  5.  
  6. // here 'int' detected
  7. Test(1, (intVariable) =>
  8. {
  9.  
  10. });
  11.  
  12. // here 'string' detected
  13. Test("hello", (stringVariable) =>
  14. {
  15.  
  16. });
  17.  
  18. Test(int.Parse, (parseMethod) =>
  19. {
  20. parseMethod("11");
  21. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement