Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Program
- {
- static void Main(string[] args)
- {
- //2. yöntemin kullanımı
- DonenTip tip = Yontem2();
- //sonuc
- //tip.a -> 20 ve tip.b -> 10 olur.
- }
- //2. yöntem -> sınıf(class) kullanmak
- class DonenTip
- {
- public int a, b;
- }
- static DonenTip Yontem2()
- {
- DonenTip tip = new DonenTip();
- tip.a = 20;
- tip.b = 10;
- return tip;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement