How can Path.Combine be used with more than two arguments?
问题 I'm surprised there's not an overload that can take a string array. Anyway, what is the best way to avoid nesting calls to Path.Combine? pathValue = Path.Combine(path1, Path.Combine(path2, Path.Combine(path3, path4))) This seems inefficient since it results in four new strings being created just to get one. 回答1: The efficiency side of things isn't the problem IMO - it's the usability side of things. Personally I think there ought to be an overload of: Combine(string first, string second,