Thursday, May 07, 2009

vb.net how to set Structures and Enum global

In a module you have declared a Structure or Enum that you will use through out a project.
Module Module1
Public Structure dummy
Dim i As Integer
Dim s As String
End Structure
End Module
But you can't, you will get an error if you declare following in an other Form
Dim fi as dummy; will give an error looking something like this:
Error 6 'fi' cannot expose type 'Module1.dummy' outside the project through class 'Form1'.

Fix:
Declare Module Module1 as Friend Or Public.
Code:
Public Module Module1
Public Structure dummy
Dim i As Integer
Dim s As String
End Structure
End Module

No comments:

MySQL to MariaDB

 Here is a good description how to migrate to MariaDb MySQL to MariaDb Example of how to dump data from MySQL port=3307: mysqldump --user=ro...