Guest User

Untitled

a guest
Jun 25th, 2018
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. using System;
  2.  
  3. namespace ExemploSobrecargaIn
  4. {
  5. class Program
  6. {
  7. private static void TesteSobrecarga(int valor)
  8. {
  9. Console.WriteLine($"Sem o modificador in: {valor}");
  10. }
  11.  
  12. public static void TesteSobrecarga(in int valor)
  13. {
  14. Console.WriteLine($"Com o modificador in: {valor}");
  15. }
  16.  
  17. static void Main(string[] args)
  18. {
  19. TesteSobrecarga(5);
  20.  
  21. int valorTeste = 10;
  22. TesteSobrecarga(in valorTeste);
  23.  
  24. Console.ReadKey();
  25. }
  26. }
  27. }
Add Comment
Please, Sign In to add comment