Click here to Skip to main content
15,916,846 members
Home / Discussions / C#
   

C#

 
GeneralRe: hi Christian Pin
J4amieC11-May-08 22:43
J4amieC11-May-08 22:43 
GeneralRe: hi Christian Pin
Vikram A Punathambekar11-May-08 22:52
Vikram A Punathambekar11-May-08 22:52 
GeneralRe: hi Christian Pin
Christian Graus11-May-08 23:12
protectorChristian Graus11-May-08 23:12 
GeneralRe: hi Christian Pin
Anthony Mushrow12-May-08 1:44
professionalAnthony Mushrow12-May-08 1:44 
QuestionHow to make Property window readonly at runtime [modified] using c# Pin
subhash1 2311-May-08 21:08
subhash1 2311-May-08 21:08 
AnswerRe: How to make Property window readonly at runtime [modified] using c# Pin
Christian Graus11-May-08 22:09
protectorChristian Graus11-May-08 22:09 
Questionsearch for torrent files Pin
Umesh873811-May-08 21:02
Umesh873811-May-08 21:02 
AnswerRe: search for torrent files Pin
Christian Graus11-May-08 21:05
protectorChristian Graus11-May-08 21:05 
GeneralRe: search for torrent files Pin
Umesh873811-May-08 21:19
Umesh873811-May-08 21:19 
GeneralRe: search for torrent files Pin
Christian Graus11-May-08 21:24
protectorChristian Graus11-May-08 21:24 
GeneralRe: search for torrent files Pin
Umesh873811-May-08 21:27
Umesh873811-May-08 21:27 
Questiontransfer parameter to thread via .NET 1.0 [modified] Pin
shinboxe11-May-08 20:52
shinboxe11-May-08 20:52 
AnswerRe: transfer parameter to thread via .NET 1.0 Pin
#realJSOP11-May-08 23:47
professional#realJSOP11-May-08 23:47 
GeneralRe: transfer parameter to thread via .NET 1.0 Pin
shinboxe12-May-08 3:02
shinboxe12-May-08 3:02 
GeneralRe: transfer parameter to thread via .NET 1.0 [modified] Pin
#realJSOP12-May-08 5:27
professional#realJSOP12-May-08 5:27 
Questionhow to merge contents of files into single file Pin
uglyeyes11-May-08 20:44
uglyeyes11-May-08 20:44 
hi!

I am trying to create a console application that accepts a directory path. for eg.
c:\folder

it should read all the files with in this folder with extension .sql and merge into single file. there could be more than one files in the folder. I need to create a new file which should merge all the contents of these files and delete all originals. could someone please help me how to do this.
so far i am stucked here..

public void ProcessDir(string sourceDir)
{
string[] fileEntries = Directory.GetFiles(sourceDir, "*.txt", SearchOption.TopDirectoryOnly);


FileStream fout;

// open output file
try
{
FileStream fsw = new FileStream("C:\\work\\7.5.08\\testmsbuild\\Foo\\Foo\\Z.txt", FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.Read);
}
catch (IOException exc)
{
Console.WriteLine(exc.Message + "\nError Opening Output File");
return;
}

foreach (string fileName in fileEntries)
{
// do something with fileName
Console.WriteLine(fileName);
StreamReader tr = new StreamReader(fileName);

}
AnswerRe: how to merge contents of files into single file Pin
Christian Graus11-May-08 20:48
protectorChristian Graus11-May-08 20:48 
QuestionMDI Pin
benjamin yap11-May-08 20:43
benjamin yap11-May-08 20:43 
AnswerRe: MDI Pin
greekius11-May-08 21:08
greekius11-May-08 21:08 
GeneralRe: MDI Pin
benjamin yap11-May-08 22:53
benjamin yap11-May-08 22:53 
GeneralRe: MDI Pin
natsuyaki11-May-08 23:13
natsuyaki11-May-08 23:13 
QuestionOUTLOOK Connector Pin
mohant$.net11-May-08 20:21
mohant$.net11-May-08 20:21 
QuestionHow to embed Excel spreadsheet in Windows forms application Pin
nilam247711-May-08 19:53
nilam247711-May-08 19:53 
AnswerRe: How to embed Excel spreadsheet in Windows forms application Pin
Spunky Coder11-May-08 20:14
Spunky Coder11-May-08 20:14 
QuestionRe: How to embed Excel spreadsheet in Windows forms application Pin
nilam247711-May-08 20:39
nilam247711-May-08 20:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.