Without a sample of the text file content it is shooting in the dark. We would just imagine that you have a text file where each line has an integer representation and you want to sort the values, something like:
123
747
1
39
4
? If so it is as simple as it might be without error checking:
string fileName = @"c:\My Folder\myTextFile.txt";
var sorted = File.ReadAllLines(fileName)
.Select( line => int.Parse(line) )
.OrderBy( i => i );