VB.NET: short cuts in code

Posted by Craig Johnston on Stack Overflow See other posts from Stack Overflow or by Craig Johnston
Published on 2010-06-11T08:42:16Z Indexed on 2010/06/11 9:03 UTC
Read the original article Hit count: 312

Filed under:

Why is the following VB.NET code setting str to Nothing in my VS2005 IDE:

If Trim(str = New StreamReader(OpenFile).ReadToEnd) <> "" Then
    Button2.Enabled = True
    TextBox1.Text = fname
End If

OpenFile is a Function that returns a FileStream

© Stack Overflow or respective owner

Related posts about vb.net