Jump to content
Xtreme .Net Talk

Erel

Members
  • Posts

    5
  • Joined

  • Last visited

Erel's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Yes. :confused: When I run this code I see the numbers climb up to 100 and the scrollbar stays at the bottom.
  2. Works fine here: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim i As Integer For i = 1 To 100 TextBox1.Text += "Text" + i.ToString + ControlChars.NewLine TextBox1.SelectionStart = TextBox1.Text.Length TextBox1.ScrollToCaret() Next End Sub
  3. Try: Activator.CreateInstance(GetType(X1), Reflection.BindingFlags.NonPublic OR Reflection.BindingFlags.Instance OR Reflection.BindingFlags.Static,...
  4. These 3 characters are Unicode BOM characters. It tells text editors which unicode format the file uses. To avoid these characters, save the file encoded as ASCII. Most editors won't show the BOM but some will show it.
  5. As Arch4ngel wrote, you can build an array of words from the whole text using Split. Now, you can use a Hashtable to count how many times each word appears in the text. For example: Hashtable htWords = new Hashtable(); String[] words; ... words = txt.Split(); //txt is the string from the text file Foreach (string word in words) { if (htWords.Contains(word)) htWords[word] = (int)htWords[word]+1; else htWords.add(word,1) } At the end the Hashtable should include a list of all the words and the number of times each word appears.
×
×
  • Create New...