• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 505
  • Last Modified:

Getting exception -> "The type initializer for 'myProject.myModule' threw an exception."

Hi Guys,

I really need help for this issue.

I have .net windows application written in vb with a module (MyModule) that as the declaration of a variable with the following declaration:

Public GblDocuWareInicioAberto As Boolean

When i try to set the value of this variable on the form class i get the exception:
"The type initializer for 'myProject.myModule' threw an exception."

I dont know what is happening here. This application has been updated to framework 3.5 and since then it has this error.

Kind Regards.

Rodrigo
// The Module
 
Option Explicit On 
 
Imports System.Data
Imports System.Data.SqlClient
Imports System.Globalization
Imports System.Threading
 
Module myModule
 
Public GblDocuWareInicioAberto As Boolean
 
End Module
 
// The call from the form class
Private Sub frmMain_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
 
GblDocuWareInicioAberto = True
 
End Sub

Open in new window

0
r_guerreiro
Asked:
r_guerreiro
1 Solution
 
r_guerreiroAuthor Commented:
I really dont know what was happening. I just deleted the module and created a new one. After that i renamed the variable name. Now it's working.
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now