Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. class Program
  2. {
  3. static void Main(string[] args)
  4. {
  5. //2. yöntemin kullanımı
  6. DonenTip tip = Yontem2();
  7. //sonuc
  8. //tip.a -> 20 ve tip.b -> 10 olur.
  9. }
  10.  
  11. //2. yöntem -> sınıf(class) kullanmak
  12. class DonenTip
  13. {
  14. public int a, b;
  15. }
  16.  
  17. static DonenTip Yontem2()
  18. {
  19. DonenTip tip = new DonenTip();
  20. tip.a = 20;
  21. tip.b = 10;
  22. return tip;
  23. }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement