using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApplication8 { class Dane { public int a = 1; } class Wypisz { public static void metoda(Dane d) { Console.WriteLine(d.a); // musisz przekazac obiekt dane by moc wyswietlic go. } } class Program { static void Main(string[] args) { Dane a = new Dane(); Dane b = new Dane(); Wypisz.metoda(a); //wypisuje wartosc a w a Wypisz.metoda(b); //wypisuje wartosc a w b //mozesz tez zmienic dane w a np. a.a = 5; Wypisz.metoda(a); } } }