Saturday, May 07, 2005 7:25 AM
Why doesn't this declaration work in my forms
Public Class ClassPrimary
Friend s As String = ControlChars.CrLf
Shared Sub main()
When I type s in a form it is said to be undeclared.
Saturday, May 07, 2005 7:40 AMModeratorBecause in the above code, 's' is an instance method, and therefore can't be accessed without creating an instance of ClassPrimary.
Put 'Shared' after Friend and then you should be able to do access it via 'ClassPrimary.s'.
Saturday, May 07, 2005 7:53 AMThanks, but I don't think it's worth the trouble at this point. Maybe for new variables where dim sChar as string = classprimary.s