Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace ConsoleApplication7
- {
- class Program
- {
- static void Main(string[] args)
- {
- Pies.wypisz();
- Console.ReadKey();
- }
- }
- class Pies
- {
- public static int Il_nog;
- public string imie;
- // Gdy Tworzymy prywatny konstruktor blokujemy mozliwosc tworzenia nowych obiektow
- /* private Pies()
- {
- Console.WriteLine("dziala");
- } */
- public Pies()
- {
- imie = "Krzysio";
- Console.WriteLine("Asdasdasd");
- }
- public Pies(string imiee)
- {
- imie = imiee;
- Console.WriteLine("Dziala");
- }
- public static void wypisz()
- {
- Console.WriteLine(Il_nog);
- }
- // Statyczny wykonuje sie jako pierwszy
- static Pies()
- {
- Console.WriteLine("asd");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment