|
-
Jul 19th, 2009, 10:45 PM
#1
Thread Starter
New Member
Find a group of numbers in a file
Hi there i was wondering if someone could help me out. Im trying to make a program that will find this specific group of numbers in a file. Then i want it to pop up in a Text box. Im still learning so take it easy on me. Thanks in advanced.
-
Jul 19th, 2009, 10:51 PM
#2
Re: Find a group of numbers in a file
If it is a small text file, you can use System.IO.File.ReadAllText to read all the text into a string variable and then search for what you are looking for using the indexof method.
-
Jul 19th, 2009, 10:54 PM
#3
Re: Find a group of numbers in a file
The first thing you'll want to do is read all the lines of the file using IO.ReadAllLines, then you will loop through each line in the results and check if the line contains the group of numbers that you are looking for using String.Contains, if that returns True then you will next show call MessageBox.Show.
Edit: beat to the punch!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|