Hi. I’m a VB6 coder (intermediate level,) but very rusty after 22 months of software support and no new development. I’m totally new to VB.NET, and after all this time I’m expected to hit the ground running using VB.NET. No crawling before walking, walking before running, etc.
I have some logic behind a form (for now,) that does pretty much what I want it to. The logic can’t stay in the form, though, because I don’t need a user interface. Ultimately, I need to put the logic into a Class where I can call it from a Windows Service (which has yet to be created, but that's another topic for another day.)
Okay, don’t laugh now… I created the Class and copied over some of the logic. Oh my gosh… Errors GALORE! I’ve pasted the offending code below only up to the point of the first error. The last line of this code is strFileDate = strDate. I’m getting the squiggly line under strFileDate to let me know VB.NET doesn’t like it. When I hover over strFileDate, the tip says “Declaration expected.” Can someone explain to me what I’m doing wrong here? Thanks.
Public Class MyClass
Dim strFileDate As String
Dim strDate As String = Mid(CStr(Now), 1, 10)
strFileDate = strDate
Tracey
I have some logic behind a form (for now,) that does pretty much what I want it to. The logic can’t stay in the form, though, because I don’t need a user interface. Ultimately, I need to put the logic into a Class where I can call it from a Windows Service (which has yet to be created, but that's another topic for another day.)
Okay, don’t laugh now… I created the Class and copied over some of the logic. Oh my gosh… Errors GALORE! I’ve pasted the offending code below only up to the point of the first error. The last line of this code is strFileDate = strDate. I’m getting the squiggly line under strFileDate to let me know VB.NET doesn’t like it. When I hover over strFileDate, the tip says “Declaration expected.” Can someone explain to me what I’m doing wrong here? Thanks.
Public Class MyClass
Dim strFileDate As String
Dim strDate As String = Mid(CStr(Now), 1, 10)
strFileDate = strDate
Tracey