Avatar of emi_sastra
emi_sastra asked on

Absolete Command For Reading File.

Hi All.

  While CSharpImpl.__Assign(bytesRead, fileStream.Read(buffer, 0, buffer.Length)) <> 0
            rs.Write(buffer, 0, bytesRead)
        End While

Severity      Code      Description      Project      File      Line      Suppression State
Warning      BC40000      'Public Shared Function __Assign(Of Integer)(ByRef target As Integer, value As Integer) As Integer' is obsolete: 'Please refactor calling code to use normal Visual Basic assignment'.       

What is wrong with this and how to solve this ?

Thank you.
Visual Basic.NET

Avatar of undefined
Last Comment
Jacques Bourgeois (James Burger)

8/22/2022 - Mon

From the error message, it appears that the write() method/function returns a value that VB.Net can't ignore.  Please try assigning the result to some variable.

Hi  aikimark,

It is said absolete or may be should change to other vb command?

Thank you.
Jacques Bourgeois (James Burger)

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.