We help IT Professionals succeed at work.

Absolete Command For Reading File.

emi_sastra
emi_sastra asked
on
30 Views
Last Modified: 2020-05-16
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.
Comment
Watch Question

aikimarkSocial distance; Wear a mask; Don't touch your face; Wash your hands for 20 seconds
CERTIFIED EXPERT
Top Expert 2014

Commented:
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.

Author

Commented:
Hi  aikimark,

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

Thank you.
CERTIFIED EXPERT
Top Expert 2015
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.