I dont understand how this works - C#