Click here to Skip to main content
15,901,284 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
plz reply me
How to connect multiple text files using next previous buttons useing C# in window application.
Posted
Comments
thanh_bkhn 4-Jul-13 3:17am    
What does "next previous buttons" mean?
If you just want to connect multiple text files, so read them and dump to another file.
MuhammadUSman1 5-Jul-13 0:42am    
What exactly your mean?
What you want to do?
What do you mean by Connect multiple text files?
Where you want to connect?

1 solution

Read All Files to The Array from the Folder
C#
var files = from file in Directory.GetFiles(@"Folder Path")
                        orderby file descending
                        select file;
            int count=files.Count();
            string[] array= files.ToArray();

Read The Required File in your button CLick event
C#
TextReader objstream = new StreamReader(array[0]);
richTextBox1.Text = objstream.ReadToEnd();
objstream.Close();
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900