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

  • Home
  • SEARCH
  • 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 787193
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T21:09:48+00:00 2026-05-14T21:09:48+00:00

Is VS2010, I analyzed my code and got this error: Warning 64 CA1050 :

  • 0

Is VS2010, I analyzed my code and got this error:

Warning 64  CA1050 : Microsoft.Design : 'ApplicationVariables' should be declared inside a namespace.   C:\My\Code\BESI\BESI\App_Code\ApplicationVariables.vb   10  C:\...\BESI\

Here is some reference info on the error. Essentially, I tried to create a class to be used to access data in the Application object in a typed way.

The warning message said unless I put my (ApplicationVariables) class in a Namespace, that I wouldn’t be able to use it. But I am using it, so what gives?

Also, here is a link to another StackOverflow article that talks about how to disable this warning in VS2008, but how would you disable it for 2010? There is no GlobalSuppressions.vb file for VS2010.

Here is the code it is complaining a bout:

Public Class ApplicationVariables

    'Shared Sub New()

    'End Sub 'New

    Public Shared Property PaymentMethods() As PaymentMethods
        Get
            Return CType(HttpContext.Current.Application.Item("PaymentMethods"), PaymentMethods)
        End Get
        Set(ByVal value As PaymentMethods)
            HttpContext.Current.Application.Item("PaymentMethods") = value
        End Set
    End Property
    'Etc, Etc...

End Class
  • 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-14T21:09:48+00:00Added an answer on May 14, 2026 at 9:09 pm

    I suspect that the code you entered is in your App_Code fodler of your web app. This code is accessible from your web code as you have deomnstrated but is not accessible from any other assembly.

    You can suppress the instance of the error by right mouse clicking on the particular error and selecting “Suppress Message In Source.” That’ll result in code being added to your source that says “the next time you check this error-fuggedabodit!”

    When to Suppress Warnings
    --------------------------------------------------------------------------------
    
    While it is never necessary to suppress a warning from this rule, it is safe to do this when the assembly will never be used with other assemblies. 
    

    To suppress the error on all occurences, select “Suppress in Project Suppression File”

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

Sidebar

Ask A Question

Stats

  • Questions 386k
  • Answers 386k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I assume that MyClass & mc = myList.begin() + index;… May 14, 2026 at 11:48 pm
  • Editorial Team
    Editorial Team added an answer If this is cross domain, you won't be able to… May 14, 2026 at 11:48 pm
  • Editorial Team
    Editorial Team added an answer Set.retainAll() is how you find the intersection of two sets.… May 14, 2026 at 11:48 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.