.Net Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - More.Net Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old May 4th, 2008, 05:36 AM
smelf1 smelf1 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2008
Posts: 11 smelf1 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 19 m 22 sec
Reputation Power: 0
Read file into buffer vb.net

Hi,

How can i read each char or number in a textfile into a seperate buffer.

So if i have tea in the text file it will read t into buffer1, e into buffer2, and so on.

Code:
 Private Sub Buttoncontohex_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonContohex.Click
        'Read in c:\message.txt and converts the ascii to Hex format and displays it in a text box
        Dim objReader As New IO.StreamReader("C:\message.txt", System.Text.Encoding.Default)
        Dim strData As String = objReader.ReadToEnd
        objReader.Close()
         End Sub

Reply With Quote
  #2  
Old May 5th, 2008, 05:32 AM
Peter_APIIT Peter_APIIT is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 22 Peter_APIIT Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 40 m 10 sec
Reputation Power: 0
You have double post in this section of forums.

Reply With Quote
  #3  
Old May 5th, 2008, 09:14 AM
LyonHaert's Avatar
LyonHaert LyonHaert is offline
Arcane Scribbler
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Jun 2005
Location: Indianapolis, IN
Posts: 1,610 LyonHaert User rank is Major (30000 - 40000 Reputation Level)LyonHaert User rank is Major (30000 - 40000 Reputation Level)LyonHaert User rank is Major (30000 - 40000 Reputation Level)LyonHaert User rank is Major (30000 - 40000 Reputation Level)LyonHaert User rank is Major (30000 - 40000 Reputation Level)LyonHaert User rank is Major (30000 - 40000 Reputation Level)LyonHaert User rank is Major (30000 - 40000 Reputation Level)LyonHaert User rank is Major (30000 - 40000 Reputation Level)LyonHaert User rank is Major (30000 - 40000 Reputation Level)LyonHaert User rank is Major (30000 - 40000 Reputation Level) 
Time spent in forums: 1 Month 1 Day 18 h 39 m 36 sec
Reputation Power: 379
If you want individual characters, you already have them in strData. You can address individual characters with strData[index]. Or you can call strData.ToCharArray() to get a char[].
__________________
Joel B Fant - LyonHaert.net

2 + 2 is... 10... in base 4

Reply With Quote
  #4  
Old May 5th, 2008, 05:05 PM
smelf1 smelf1 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2008
Posts: 11 smelf1 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 19 m 22 sec
Reputation Power: 0
hi,

I am not sure how to read each char or number in the message into seperate buffers, next i need to add a sequence header and send them in order to another buffer.

But i am not sure how to do this

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - More.Net Development > Read file into buffer vb.net


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway