This probably has a simple answer, but I must not have had enough coffee to figure it out on my own:
If I had a comma delimited string such as:
string li
For people who love extension methods like me, here it is:
public static string MethodA(this string[] array, string seperatedCharecter = "|")
{
return array.Any() ? string.Join(seperatedCharecter, array) : string.Empty;
}
public static string MethodB(this string[] array, string seperatedChar = "|")
{
return array.Any() ? MethodA(array.Select(x => $"'{x}'").ToArray(), seperatedChar) : string.Empty;
}