Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static string WrapEachWith(this IEnumerable values, string before, string after, string separator)
- {
- var list = new List<string>();
- foreach (object value in values)
- {
- list.Add(string.Format("{0}{1}{2}", before, value, after));
- }
- return string.Join(separator, list.ToArray());
- }
Advertisement
Add Comment
Please, Sign In to add comment