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 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/>
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/>
"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/>
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/>
"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/> This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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
|
by: M. Angelo |
last post by:
Is there a way to speed up FileGet and FilePut?
Or should I use another method?
|
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 --...
|
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?
|
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)
| |
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
|
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...
|
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)
{
...
|
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,...
|
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...
|
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...
| |
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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
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...
| |