Hi.
I have just 1 really very urgent question.
I should write a program which does these works:
When clicked the open button, opens a text file.
read the content of text file and count the characters.(all chars even spaces)
Shows the result in a richtextbox.
for each character show the number of it in text file
sort the characters in order to their number (most used character at top and least used at last)
I have written some code but its still incomplete.
Who can help me in this case?
Please help me with c# code not algorithm.
Every nice help is appreciated a lot.
Best regards,
My c# codes:
Stream myStream;
FileDialog openFileDialog1 = new FileDialog();
= Application.ExecutablePath;
openFileDialog1.Filter = "txt files(*.txt)|*.txt|All files()|";
openFileDialog1.FilterIndex = 1;
= true;
if (openFileDialog1.ShowDialog() == DialogRK)
{
if ((myStream = openFileDFile()) != null)
{
// make the characters info in richtextbox1
long length = myStream.Length;
richTextBox1.Visible = true;
richTextBox1.Text = "Total characters of text file is " + length;
// here should be codes for reading and counting each char used.
// how should I do that.
}
myStream.Close();
}
I am waiting for your help.
Want to be your own boss? Learn how on Yahoo! Small Business.
[Non-text portions of this message have been removed]
Yahoo! Groups Links
<*To visit your group on the web, go to:
<*To unsubscribe from this group, send an email to:
CSharpNET-unsubscribe (AT) yahoogroups (DOT) com
<*Your use of Yahoo! Groups is subject to: