Helper methods in c#