public static void Main()
var program = new Program();
var result = program.ParseCostCenterLocation("CC", "", "CH01B");
Console.Write("Result: " + result);
result = program.ParseCostCenterLocation("", "", "CH01B");
Console.Write("Result: " + result);
result = program.ParseCostCenterLocation("STORE", "", "CH01B");
Console.Write("Result: " + result);
result = program.ParseCostCenterLocation("STORE", "P100123CH1", "CH01B");
Console.Write("Result: " + result);
public string ParseCostCenterLocation(string purchaseType, string projectId, string costCenter)
if (false == string.IsNullOrEmpty(purchaseType))
} else if (true == string.IsNullOrEmpty(purchaseType) & true == string.IsNullOrEmpty(projectId))