Go Back  Xtreme Visual Basic Talk > Visual Basic .NET (2002/2003/2005/2008, including Express editions) > .NET File I/O and Registry > Read one word form a text file

Thread Tools Display Modes
Old 05-16-2004, 02:55 PM
NickOlsen NickOlsen is offline
Join Date: Apr 2004
Location: Irvine, CA
Posts: 85
Default Read one word form a text file

I have a text file and I want to be able to read just one word, not the whole line, or the whole file.

I am using System.IO.StreamReader right now and i can't seem to find anything that will read just one word at a time.

Any ideas??

Reply With Quote
Old 05-16-2004, 08:44 PM
Iceplug's Avatar
Iceplug Iceplug is offline

Retired Moderator
* Guru *
Join Date: Aug 2001
Location: Iowa, USA
Posts: 16,583

That's because there isn't.
You need to use the StreamReader's .Read property to read until you read in a space character or a period, or a question or exclamation mark, or whatever else you want to define the end of a word.

Iceplug, USN
Quadrill 1 Quadrill 2 (full) Quadrill 3 JumpCross .NET Website is ALIVE! - DL Platform Tour for VB.NET! Posting Guidelines Hint: Specify your location in your user cp profile if you want compassion!
Reply With Quote

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Installation Problem - PLs help urgenlty dpdsouza Installation / Documentation 4 12-02-2004 08:09 PM
File I/O In VB.Net MikeJ Tutors' Corner 1 02-28-2004 10:49 PM
How to read text file line by line? phuonghuy2000 General 3 10-07-2003 11:16 AM


Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..