Code below will merge the multiple files into single file. This will work in C# 4.0 framework on wards. tempFiles is the string , holding the filepath+name of the files . Between each files a separator',' is present.
string[] split = tempFiles.Split(',');
string export_file = "MergedFiles.txt";
File.WriteAllLines(filePath + export_file, split.SelectMany(File.ReadLines));
Quick Notes for easy understanding. Chapters are on C#.Net,Linq,OOPS,Design Patterns,UML,Tools for development, Databases and many others. - Sid
Tuesday, August 20, 2013
Subscribe to:
Post Comments (Atom)
Code Formater
Paste Here Your Source Code | ||||||||||||||
Source Code Formatting Options | ||||||||||||||
|
||||||||||||||
Copy Formatted Source Code | ||||||||||||||
Preview Of Formatted Code |
No comments:
Post a Comment