text: public static string SegmentFileName(string segmentName, string segmentSuffix, string ext){if (ext.Length > 0 || segmentSuffix.Length > 0){Debug.Assert(!ext.StartsWith(".", StringComparison.Ordinal));StringBuilder sb = new StringBuilder(segmentName.Length + 2 + segmentSuffix.Length + ext.Length);sb.Append(segmentName);if (segmentSuffix.Length > 0){sb.Append('_').Append(segmentSuffix);}if (ext.Length > 0){sb.Append('.').Append(ext);}return sb.ToString();}else{return segmentName;}}