Async and await in .NET 4.5

Yesterday I was playing around with Windows 8 and VisualStudio 11 and because my University is developing a web service to connect to the class schedule I played around with the semi-finished service and tried to get some data out.

The implementation of the alpha service is horrible, there is no authorisation and there isn´t [...]

Simple TCP/IP client/server application

Intro

For a university lecture I had to write a simple application to demonstrate a client/server communication over TCP/IP. I know there are many demos in the world wide web and now there is one more ;-)

Code

Below I post you the code and at the end of the post you will find a [...]

Work with Exchange Web Services

The following code has cost me allot of time. It was very hard to find the pieces and put them together. So I hope I can help a few of you with that post ;-)

The Problem

The problem was that I need to access different Exchange accounts via Exchange Web Services (EWS) [...]

Setting up a Mac VM inside Windows 7

1. Intro

Because of some changes in my company I now have to code for iOS. This is why I need to learn Cocoa (the programming language for developing iOS software). So tonight I have set up a virtual machine with Mac OS X Lion 10.7.2 to play a little bit around with Xcode – [...]

How to use Eventhandlers in C#

class Program { static void Main() { //init stock Stock s1 = new Stock(); //add handler s1.PriceChanged += new PriceChangedHandler(s1_PriceChanged); s1.MyFunction += new MyFunctionhandler(s1_MyFunction); //change something s1.Price = 12; s1.myFunction(2); Console.Read(); } public static void s1_PriceChanged(decimal a, decimal b) { Console.WriteLine(“Old value: ” + a + ” – new value: ” + b); } public [...]