troubleshooting Question

.NET 2.0 System.IO Syntax changes required by Microsoft!

Avatar of dba123
dba123 asked on
Visual Basic.NET
3 Comments1 Solution254 ViewsLast Modified:
This drives me nuts.  I come across functions that are no longer supported often in ASP.NET 2.0 by getting messages, though nice, in VS 2005.  Ok, well, then I have to look these up to try to find out what the heck to replace them with.  I wish Microsoft would just bring you to the page automatically on the net that refers to the change that is required because I waste many hours trying to find this stuff on BOL.

Anyway, one example, which is this article by MS on System.IO (

shows this below:

Imports System
Imports System.IO

Class Test
    Public Shared Sub Main()
            ' Create an instance of StreamReader to read from a file.
            Dim sr As StreamReader = New StreamReader("TestFile.txt")
            Dim line As String
            ' Read and display the lines from the file until the end
            ' of the file is reached.
                line = sr.ReadLine()
            Loop Until line Is Nothing
        Catch E As Exception
            ' Let the user know what went wrong.
            Console.WriteLine("The file could not be read:")
        End Try
    End Sub
End Class

When I try this code in my VS 2005 project, I get an error saying "Input" is no longer supported and that you have to use "LineInput".  I found info on LineInput here:

I guess what I'm asking is there an official .NET 2.0 page just for System.IO I should be referencing here so that I don't have to go through this, or am I just stuck with having to research these darn syntax changes every time Microsoft decides to change it in new .Net versions?

I get pretty frustrated when I'm spending half my time looking up syntax from ASP 1.1 to 2.0
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 3 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros