I have string separated by dot (\'.\') characters that represents a hierarchy:
string source = \"Class1.StructA.StructB.StructC.FieldA\";
How c
Shlemiel the painter approach is better than the "super Shlemiel" string.Join in this case.
const char DELIMITER = '.'; string soFar = ""; List result = source.Split(DELIMITER).Select(s => { if (soFar != "") { soFar += DELIMITER; }; soFar += s; return soFar; }).ToList();