As others have said, you probably want to use Path.Combine
However, you can easily create your own method for this:
public string AddBS(string value) { return value.EndsWith("\\") ? value : value + "\\"; }
To make it more general, I would suggest making an extension, for example:
public static class StringExtensions { public static string AddSuffix(this string value, string suffix) { return value.EndsWith(suffix) ? value : value + suffix; } }
source share