updated c-sharp class for an all method