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


Reply
 
Thread Tools Display Modes
  #1  
Old 05-16-2004, 03:55 PM
NickOlsen NickOlsen is offline
Regular
 
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??

Thanks
Reply With Quote
  #2  
Old 05-16-2004, 09:44 PM
Iceplug's Avatar
Iceplug Iceplug is offline
MetaCenturion

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

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
Reply


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 12:16 PM

Advertisement:





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.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
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..
subscribe
 
 
-->