473,397 Members | 2,099 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Visual Basic equivalent "Get" keyword in C#

Hi,

I'm looking for the VB 6 equivalent "GET" in C#.

I have a DAT file in binary format."
I can read the file using "BinaryReader class - Read...() Method" but the problem is I need a proper chunk of data to be read.

For example VB 6 uses the below code to read a DAT File,

Input is a DAT File

intBinaryFile = FreeFile
Open ""c:\termrate.dat" For Binary As intBinaryFile
Get #intBinaryFile, , TermRateArray()
Close #intBinaryFile

I want an equivalent code in C# to achieve the same output.

Kindly advice.

with regards,
Krish TS
Sep 25 '08 #1
1 1615
Plater
7,872 Expert 4TB
What exactly did that do?
BinaryReader provides plenty of ReadChar() ReadInt64(), which ARE proper data chunking.
If all you want is a Byte Array (byte[]) then a regular old FileStream can do that. All streams objects can.
Sep 25 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Pete Mahoney | last post by:
Ok I use a textarea to store data input by the user, and then upon them clicking the submit button I store this data to a database. The problem is once the user inputs too much data (about 3...
0
by: habdalla | last post by:
When loading crystal reports in my windows applications(created using Visual C#), I get an error "Buffer too small for string or missing null byte". I tried various things i.e. increasing the...
9
by: jensen bredal | last post by:
I have a dataView and i only want to get the first x rows . Is there a way of doing this without using Foreach? Thanks JB
5
by: Jeff | last post by:
Visual Studio 2003 DotNet framework 1.1 Windows 2000 Pro I create two pages in an Asp.net application, one is html page with a form in it: .... <form id="testForm" method="post"...
3
by: Robert Liles | last post by:
I am using Visual Basic.NET 2002 and cannot get "collate" from the PrintDialog1 or e.PageSettings.PrinterSettings.Collate to return anything but "False." What am I doing wrong? I am using...
3
by: Bsr | last post by:
What is the difference between for the following methods. "GET", "HEAD", "PUT" or "POST". Ex:my $req =HTTP::Request->new(GET =>$url1); Bhuvan.
5
by: WP | last post by:
Hello, I need to communicate with a db2 database from a java program and this java program needs to check which "user tables" there are. I came up with the following query which I tried in Control...
1
by: =?Utf-8?B?UmljaA==?= | last post by:
On my old workstation (development workstation) if I set Application/Enable XP visual styles - I was able to get/see the visual styles - like button borders highlighting when you run the mouse over...
1
by: mahdialkhatib | last post by:
Hello everybody, I'm wondering about these accessors and what the benefit that I would get from them i understood what "set function" is for, but i didn't get it with the "get function ". ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...

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.