static void Main(String[] args) { var items = new IITEM[] { new Book("Real-Time Rendering", 12.35, Currency.EUR, "1234556", "rudi"), new Book("The Hitchhiker's Guide to the Galaxy", 34.35, Currency.EUR, "56789", "olaf"), new Book("C# 6.0 in a Nutshell", 10.15, Currency.EUR, "78923", "zottl"), new Book("Trillions: Thriving in the Emerging Information Ecology", 67.45, Currency.EUR, "56748", "peter"), new Book("Cryptonomicon", 99.80, Currency.EUR, "98767", "Franz") }; Serilization.Run(items); }
static void Main(String[] args) { var items = new IITEM[] { new Book("Real-Time Rendering", 12.35, Currency.EUR, "1234556", "rudi"), new Book("The Hitchhiker's Guide to the Galaxy", 34.35, Currency.EUR, "56789", "olaf"), new Book("C# 6.0 in a Nutshell", 10.15, Currency.EUR, "78923", "zottl"), new Book("Trillions: Thriving in the Emerging Information Ecology", 67.45, Currency.EUR, "56748", "peter"), new Book("Cryptonomicon", 99.80, Currency.EUR, "98767", "Franz") }; //Implementierung von Enumerator var zahlen = new List <int> { 1, 2, 3, 4, 5, 6, 7, 8 }; var e = zahlen.GetEnumerator(); while (e.MoveNext()) { Console.WriteLine(e.Current); } //Mittels I-Enumerable Funktion var ersten_n_zahlen = nummern().Take(5).Skip(2); foreach (var i in ersten_n_zahlen) { Console.WriteLine(i); } // Implemetierung Events var window = new Form() { Text = "window 1", Width = 500, Height = 600 }; window.MouseMove += (sender, eventArgs) => WriteLine($"[MouseMove event] ({eventArgs.X}, {eventArgs.Y})"); Application.Run(window); IObservable <Point> moves = Observable.FromEventPattern <MouseEventArgs>(window, "MouseMove") .Select(x => x.EventArgs.Location) // ... only interested in the position ; //Serilization.Run(items); }