PC Review


Reply
Thread Tools Rate Thread

Converting vb6 to .net

 
 
=?Utf-8?B?bm90cmVnaXN0ZXI=?=
Guest
Posts: n/a
 
      18th Mar 2005
Hi, how do i convert the following vb6 codes to .net? Nibble is variable
declared as Byte

InputString = ""
Open CurInputFileName For Binary Shared As #1
Do
Get #1, , Nibble
InputString = InputString & Chr$(Nibble)
Loop Until EOF(1)
Close #1

 
Reply With Quote
 
 
 
 
Cor Ligthert
Guest
Posts: n/a
 
      18th Mar 2005
NotRegister

Probably the same, however I find coding using the streamreader class for
reading much nicer. On these "filehandling" pages are a lot of samples and
links for file handling.

http://msdn.microsoft.com/library/de...classtopic.asp

I hope this helps,

Cor


 
Reply With Quote
 
=?Utf-8?B?bm90cmVnaXN0ZXI=?=
Guest
Posts: n/a
 
      18th Mar 2005
Hi

i know this "Open CurInputFileName For Binary Shared As #1" can be replace
by FileOpen(1, CurInputFileName, OpenMode.Binary, OpenAccess.Write)

and "Close #1" can be replaced by FileClose(1)

BUT...i do not know how to replaced the following,

Get #1, , Nibble
InputString = InputString & Chr$(Nibble)

Can u help me explain what does the above mean??


"Cor Ligthert" wrote:

> NotRegister
>
> Probably the same, however I find coding using the streamreader class for
> reading much nicer. On these "filehandling" pages are a lot of samples and
> links for file handling.
>
> http://msdn.microsoft.com/library/de...classtopic.asp
>
> I hope this helps,
>
> Cor
>
>
>

 
Reply With Quote
 
Cor Ligthert
Guest
Posts: n/a
 
      18th Mar 2005
NotRegister,

I see now that you have placed this question as well in the newsgroup
Microsoft.public.dotnet.languages.vb.upgrade

The guy who answered you there in that newsgroup is as well sometimes giving
answers in this newsgroup.

:-))

Therefore you can answer him there, although I assume that most probably he
is about 11 GMT or before that time active in this newsgroup as well.


Cor


 
Reply With Quote
 
Chris Dunaway
Guest
Posts: n/a
 
      18th Mar 2005
You could also take a look at the BinaryReader class. That may also
help you.

 
Reply With Quote
 
 
 
Reply

Thread Tools
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
I need some help converting this to C++ AA2e72E Microsoft C# .NET 2 5th Feb 2010 08:19 AM
Re: Converting .lib to .dll Neil Cowburn Microsoft Dot NET Compact Framework 11 19th Jun 2008 05:33 PM
Converting :mm:ss to ss Phredd Microsoft Excel Worksheet Functions 8 18th Jun 2008 07:25 PM
Converting a date to a text field w/o converting it to a julian da LynnMinn Microsoft Excel Worksheet Functions 2 6th Mar 2008 03:43 PM
help converting c# to c++? =?Utf-8?B?Sm9lbA==?= Microsoft Dot NET Framework 11 17th Aug 2006 08:49 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:45 AM.