private void ValidateTaxComponents(bool? fromMetro) { if (Basic <= 0) throw new Exception("Basic Salary is not set"); if (Hra <= 0) throw new Exception("HRA is not set"); }