Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void readFile()
- {
- var query = File.ReadLines(openFileDialog1.FileName).Where(line => !String.IsNullOrEmpty(line))
- .GroupBy(line => line.First());
- charFreq();
- }
- private void charFreq()
- {
- var charFreq =
- from c in line.ToCharArray()
- group c by c into groupFrequencies
- select groupFrequencies;
- foreach (var c in charFreq)
- rTxtOutput.Text += (String.Format("{0} : {1}", c.Key, c.Count())) + "\r\n";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement