Pain in c#