Visual Basic equivalent "Get" keyword in C#

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tskrish
    New Member
    • Aug 2008
    • 9

    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 "BinaryRead er 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.d at" 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
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    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.

    Comment

    Working...