Advanced C# questions