none
Error: empty path name is not legal

    Question

  • Public Function serialize_get(ByVal inpath As String) As Object
            Dim myobj As Object
            Dim s As Stream = New FileStream(inpath, FileMode.Open)
            Dim b As binaryformatter = New binaryformatter()
            myobj = b.Deserialize(s)
            s.Close()
            Return myobj
        End Function

    while debuggin i keep getting that error at the bold line.  how do i know what path the application is trying to save the information too

    thanks
    Wednesday, May 06, 2009 4:02 PM

Answers

  • The exception states the exact problem.

    The variable inpath has not been assigned a value, its value is "".

    Familiarise youself with the Debugger. Place a breakpoint at the associated bolded line and hover over the inpath variable.

    This should provide the answer.
    MCTS. Web, Win, Distributed
    Thursday, May 07, 2009 4:06 PM