473,602 Members | 2,774 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Filestream or FileGet?

Hello:

I am trying to read the contents of a file that be either be binary or text.

I would like to know which is better, Filestream or FileGet?

Thanks.

Venkat
Nov 21 '05 #1
5 1855
"vvenk" <vv***@discussi ons.microsoft.c om> schrieb:
I am trying to read the contents of a file that be either
be binary or text.

I would like to know which is better, Filestream or FileGet?


IMO personal preference...

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 21 '05 #2
Herbert:

Thanks for your reply. But I do want to poject myself as hep ie. with the
new implementations . FileRead, though I have used in the past reliably,
sounds backward to me.

No?

Veenkat

"Herfried K. Wagner [MVP]" wrote:
"vvenk" <vv***@discussi ons.microsoft.c om> schrieb:
I am trying to read the contents of a file that be either
be binary or text.

I would like to know which is better, Filestream or FileGet?


IMO personal preference...

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 21 '05 #3
"vvenk" <vv***@discussi ons.microsoft.c om> schrieb:
But I do want to poject myself as hep
What's "hep" (sorry, I really don't know...).
ie. with the new implementations .


If you want to make experiences with the file access classes in 'System.IO',
play around with them. Then you can decide what you like best: VB.NET's
file access methods (sometimes a valuable shortcut) or the I/O classes.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 21 '05 #4
Herfried:

This may sound stupid but I don't see System.IO in the list of .Net
Components when I tried to reference it.

Am I doing something wrong?

Venkat

"Herfried K. Wagner [MVP]" wrote:
"vvenk" <vv***@discussi ons.microsoft.c om> schrieb:
But I do want to poject myself as hep


What's "hep" (sorry, I really don't know...).
ie. with the new implementations .


If you want to make experiences with the file access classes in 'System.IO',
play around with them. Then you can decide what you like best: VB.NET's
file access methods (sometimes a valuable shortcut) or the I/O classes.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 21 '05 #5
"Venakt" <Ve****@discuss ions.microsoft. com> schrieb:
This may sound stupid but I don't see System.IO in the list of .Net
Components when I tried to reference it.

Am I doing something wrong?


'System.IO' is a namespace. If "System.dll " is referenced, it should be
available.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 21 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1789
by: TrongAn Hoang | last post by:
Hi, I am converting a VB6 program. I have data from UDT that contained all kinds of VB6 stuff like: variable length strings variants primitive types arrays of UDTs In short, it has all different kinds. I save these to disk using the Put
8
4649
by: M. Angelo | last post by:
Is there a way to speed up FileGet and FilePut? Or should I use another method?
5
8369
by: TC | last post by:
I just noticed that the Stream class has a Seek method, which implies that a FileStream object can be used to manipulate a random-access file. Before now, I assumed that a Stream, as its name implies, could only stream sequential data. Are there any advantages / disadvantages to using a FileStream to manage a random access file, as opposed to using FileOpen, FilePut, and FileGet? I am thinking specifically about performance advantages --...
16
2076
by: vvenk | last post by:
Hello: When I use either one to read a Text file, I get the same result. The length of the string that the file's content has been written into is the same. However, if the file is binary, FileGet gets me the correct content while StreamReader gives me a truncated string. Can somebody advise me why? Should I be using BinaryReader instead of StreamReader? Would BinaryReader work on text files?
0
1466
by: Mike Cooper | last post by:
Hi everyone, I am accessing several binary (PCL) files sequentially using a for loop. For each file I am using the fileget() command to populate the contents of the file into a string. I use the following commands to do so: LengthofOverlay = FileLen(PCLOven_Burn_Directory & OverlayForm) OverlayContent = StrDup(LengthofOverlay, "x") Seek(OverlayInteger, 1)
2
1328
by: Jack Russell | last post by:
I have some code I converted from VB6 to read some binary files. FileGet of an int16 seems to be returning a zero instead of the correct value. Anybody heard of this, know of a work around? Thanks
7
2298
by: Nathan Sokalski | last post by:
I am having a problem saving an image with the same name it originally had. I have two similar versions of my code, one in which I close the FileStream used to open the original image before saving, the other in which I close the FileStream afterwards, although both return the same error. Here are the two versions of the code and the errors they each return (NOTE: I rebooted immediately before running each of these versions so that I knew they...
9
5504
by: Drayshak | last post by:
Hi, I'm currently making an application which reads a file and extracts information from it. Whole files are embedded in this single file, and information about each file that is embedded is stored at a specific location within this file. fs = new FileStream(@"File Location", FileMode.Open); br = new BinaryReader(fs); rtbOutput.AppendText("English Title: " + getLanguage(br)); public string getLanguage(BinaryReader reader) { ...
0
7920
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8401
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8268
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
5867
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
3900
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3944
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2418
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1510
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1254
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.