"baret bonden" <(E-Mail Removed)> schrieb:
> I put the class at the end of a windows form, outside the form's class ,
and
That's OK.
> I put the
>
> Dim CurrentSale As New SalesRecord
> CurrentSale.CustomerName = "Matthew"
>
> simply inside the form's clode
> as in:
>
> Public Class test
>
> Inherits System.Windows.Forms.Form
>
> dim CurrentSale As New SalesRecord
>
> CurrentSale.CustomerName = "Matthew"
You will have to put the code into a procedure (at least the 2nd line), for
example (inside your class):
\\\
Public Sub Foo()
Dim CurrentSale As New SalesRecord()
CurrentSale.CustomerName = "Matthew"
...
End Sub
///
--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
|