TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Aditya Chauhan
NA
102
57.2k
How can we use AppendAllLines in .net framework 3.5
May 19 2015 1:32 AM
AppendAllLines is work in .net framework 4.5
but how can we use append all line in 3.5
//4.5
string[] a = new string[] { fa + " "+ lastModified };
System.IO.File.AppendAllLines(filepath, a);
//3.5
string[] a = new string[] { fa + " "+ lastModified };
var ab = string.Join(Environment.NewLine, DataList.Select(x => x.blah blah blah).ToArray());
string outputFilePath = @"C:\output.txt";
File.AppendAllText(outputFilePath, ab);
public static void AppendAllLines(string path, IEnumerable<string> lines)
{
using (var writer = new StreamWriter(path, true))
foreach (var line in lines)
writer.WriteLine(line);
}
Reply
Answers (
2
)
XML Generated with XML serializer is creating empty tags
How to copy and paste data from telnet server window to cmd.