Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4034990
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T12:02:30+00:00 2026-05-20T12:02:30+00:00

What does it mean when MS Visual Studio 2005 throws this message? The type

  • 0

What does it mean when MS Visual Studio 2005 throws this message?

"The type initializer for 'RMDC.clsVariables' threw an exception."

Error log is as follows

System.TypeInitializationException was unhandled
  Message="The type initializer for 'RMDC.clsVariables' threw an exception."
  Source="RMDC"
  TypeName="RMDC.clsVariables"
  StackTrace:
       at RMDC.clsFunctions.getRegistryValue() in D:\Magnus Project\Project Backup\RMDC\RMDC\Class\clsFunctions.cs:line 704
       at RMDC.Program.Main() in ..\RMDC\RMDC\Program.cs:line 39
       at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()

The class with error in question

using System;
using System.Collections.Generic;
using System.Text;
using System.Data.SqlClient;
using System.Data;
using System.Windows.Forms;
using System.Collections;


namespace RMDC
{
    class clsVariables
    {
        public SqlConnection conn = new SqlConnection();

        public SqlDataAdapter sAdapter = new SqlDataAdapter();
        public DataSet sDataSet = new DataSet();

        public static string sMessageBox = "";
        public static string sUsername;
        public static string sUserFullname;
        public static string sUserLogin;
        public static string sUserType;
        public static int sUserID;
        public static string sServer = "system-10";
        public static string sDatabase = "";
        public static string sDBUserID = "";
        public static string sDBPassword = "";
        public static bool sDontShow = false;
        public static string sCompanyName;
        public static string sContactName;
        public static string sCompanyAddress;
        public static string sPhoneNumber;
        public static string sFaxNumber;
        public static string sEmailAddress;
        public static string sWebAddress;
        public static string sOfficeCd = "01";
        public static int sfiscalYrId = 1;
        public static string sfiscalYr;
        public static DateTime sFiscalStart = DateTime.Today;
        public static DateTime sFiscalEnd = DateTime.Today;
        public static int sRoleId;

        public static byte[] m_barrImg;

        public static SqlConnection cnn = new SqlConnection();

        public OpenFileDialog openIMG = new OpenFileDialog();

        public static NepEngCalanderProvider.NepEngDateClass nepDate = new NepEngCalanderProvider.NepEngDateClass();
        public static NumberToWord.InWordsClass NumericWords = new NumberToWord.InWordsClass();


        public enum QueryType
        {
            Insert,
            Update,
            Delete
        }
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T12:02:31+00:00Added an answer on May 20, 2026 at 12:02 pm

    Well, it means what it said – something in the type initializer for RMDC.clsVariables (which is an unconventional name, btw) went bang.

    This could be a static variable initializer:

    static int foo = GetInitialValueForFoo();
    

    or a static constructor:

    static clsVariables
    {
        DoSomething();
    }
    

    Whatever it was, it failed, leaving your type unusable.

    If you run the code in the debugger, it should break in as soon as the exception is thrown, making it easier to work out what’s going on.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i am having this error when trying to build a solution in visual studio
What does this mean exactly? I'm doing something like this: File.Copy(@\\foo\bar\baz.txt, @c:\test\baz.txt); MSDN doesn't
What does it mean by POD type?cv-qualified?
What does it mean to call a class like this: class Example { public:
In Visual Studio (2005/2008) we can set a conditional breackpoint when the condition is
We're looking at upgrading from Visual Studio 2005 to Visual Studio 2008. I discovered
I'm porting a medium-sized C++ project from Visual Studio 2005 to MacOS, XCode /
I am working on some C# projects with Visual Studio 2005, and I am
Does that mean that I can't share a Form between delphi 2007 and 2009?
What does it mean when you get or create a date in UTC format

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.