I created a text file using following method:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
namespace FajlliTekstual
{
class Program
{
static void Main(string[] args)
{
FileStream fileStream = new FileStream("shenime.txt", FileMode.Create, FileAccess.Write);
TextWriter writer = new StreamWriter(fileStream);
Console.WriteLine("Someone Else");
writer.WriteLine("Bla Bla");
writer.WriteLine("Bla Bla");
writer.WriteLine("Unkown Person");
writer.Close();
fileStream.Close();
Console.ReadLine();
}
}
}
**/Now the text file holds the first and last name of someone.
My goal is to read this text file and to show the results in a console application sorted name like those that begin with A or B or other letter.
This first name latter should be given by the user and then the list must be shown.
Thank you in advance for your reply.
Cheers./
**