According to the MSDN docs for String.Join "If any element in value is null, an empty string is used instead."
The code I have pulls data out of a DataTable
rotationValues = string.Join<object>(", ",
from r in rotationData.Rows.OfType<DataRow>() select r[5]);
This would result in output similar to this:
8, 7, , 12, , , 13,
Is there any way to simply have it put "null" in place of an empty string like so:
8, 7, null, 12, null, null, 13, null