Skip to main content
2 of 6
added 28 characters in body
Salah Akbari
  • 40k
  • 10
  • 85
  • 115

You can replace your default value with Null and then use null-coalescing operator, inside your method. Something like this:

public static string ToSummaryString<T>(this IEnumerable<T> items, string delimiter = null) { var realDelimiter = delimiter ?? Environment.NewLine; } 
Salah Akbari
  • 40k
  • 10
  • 85
  • 115