string[] lines = File.ReadAllLines(Server.MapPath("~/data.txt"));
// Use string Join to concatenate the string elements. string result = string.Join("\n", lines);
// Concatenate all the elements into a StringBuilder. StringBuilder builder = new StringBuilder(); foreach (string value in lines) { builder.Append(value); builder.Append('.'); } string result = builder.ToString();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)