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 8039167
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T03:29:08+00:00 2026-06-05T03:29:08+00:00

I have something like this: … public partial class MyPage : System.Web.UI.Page { private

  • 0

I have something like this:

...
public partial class MyPage : System.Web.UI.Page
{

    private static string _code = null;
...

Will the _code variable be shared with everyone on my application who loads MyPage?

This question is not a Duplicate

The possible duplicate does not address static variables inside a non-static class. I now know it does not matter, however, the “duplicate” does not say this.

  • 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-06-05T03:29:09+00:00Added an answer on June 5, 2026 at 3:29 am

    Yes, it will be shared across the application domain. Since a single app domain is created for each IIS Application within an IIS worker thread, the value of the static variable can be considered shared globally.

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

Sidebar

Related Questions

I have something like this: class Movie { public string Title; public List<string> Genres
I have something like this: namespace MyNamespace { public partial class MyClass: UserControl {
I have something like this: class Base { public: static int Lolz() { return
I have something like this in my Spring Application: public class Book{ public Book(){
I have something like this... void f(dclass b); class dclass { dclass(string s); };
I have something like this: private var myVideo:Video; public var videoDisplay:UIComponent; ... videoDisplay.addChild(myVideo); ...
I have something like this in my page: <div id=test> <div class=item>Test</div> <div class=item>Test</div>
I have something like this: public class CPerson: INotifyPropertyChanged public class CPeople: SortedSet<CPerson> public
I have something like this in my Map public class Settings : ClassMap<Setting> {
I have something like this in my Silverlight application: <navigation:Page x:Class=PPCa.Modules.ProjectManager.Client.Views.ProjectDetailView xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml xmlns:d=http://schemas.microsoft.com/expression/blend/2008

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.