I'm new to VB.NET, however I'm a relatively experienced VB Programmer. I'm part way through creating my first Project and I seem to be having a little problem with some code.
I am getting the following error message:
It is placing the error on 2 lines and a selection of the code is as follows:
I'm sure this is really easy to fix and probably just inexperience with VB.NET, but I'm stumped.
Suggestions would be very useful.
Many thanks for any comments in advance,
Fitz
Did you know, there are 10 types of people in this world:
* Those who understand binary
and
* Those who Don't!!
I am getting the following error message:
Code:
Access of shared member, constant member, enum member or nested type through an instance; qualifying expression will not be evaluated.
It is placing the error on 2 lines and a selection of the code is as follows:
Code:
Dim objSysFile As System.IO.File
Dim objWrite As System.IO.StreamWriter
. . . . . .
If Dir(Application.StartupPath & "\SysLog\" & strFilename) = strFilename Then
[b]objWrite = objSysFile.AppendText(Application.StartupPath & "\SysLog\" & strFilename) [/b]
Else
[b]objWrite = objSysFile.CreateText(Application.StartupPath & "\SysLog\" & strFilename) [/b]
objWrite.WriteLine("{0,8}{1,6}{2,2}{3,10}{4,255}", "|-Date-|", "|Time|", "||", "|-UserID-|", "Message" & Space(248))
End If
I'm sure this is really easy to fix and probably just inexperience with VB.NET, but I'm stumped.
Suggestions would be very useful.
Many thanks for any comments in advance,
Fitz
Did you know, there are 10 types of people in this world:
* Those who understand binary
and
* Those who Don't!!