Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27554

Type initializer exception

$
0
0
Using VB 2010 Express, when I run debug on my program, the statement:
Code:

strPassWordVar = Me.pwTextBox1.Text
on my form5 generates the following exception: "The type initializer for 'WindowsApplication1.Module1' threw an exception. "

I have the following statement at to top (under the name, Module1) of my Modual1:
Code:

Public strPassWordVar As String = Form5.pwTextBox1.Text
My understanding of such things is very limited. Can someone please give me a remedy, in very simple terms...a code example would be much better.

Viewing all articles
Browse latest Browse all 27554

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>