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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T18:00:43+00:00 2026-05-26T18:00:43+00:00

I want something like a static class variable, except when different applications load my

  • 0

I want something like a static class variable, except when different applications load my assembly I want them all to be sharing the same variable.

I know I could write to disk or to a database, but this is for a process that’s used with sql queries and that would probably slow it down too much (actually I am going to test these options out but I’m asking this question in the meantime b/c I don’t think it’s going to be an acceptable solution).

I would prefer to use the solution that incurrs the least overhead in deployment, and I don’t mind if the solution isn’t easy to create so long as it’s easy to use when I’m done.

I’m aware that there are some persistent memory frameworks out there. I haven’t checked any of them out yet and maybe one of them would be perfect so feel free to recommend one. I am also perfectly content to write something myself, particularly if it makes deployment easier for me to do so.

Thanks in advance for any and all suggestions!

Edit: Looks like I was overlooking a really easy solution. My problem involved SQL only providing 8000 bytes of space to serialize data between calls to a SQL aggregate function I wrote. I read an article on how to compress your data and get the most out of that 8000 bytes, and assumed there was nothing more I could do. As it turns out, I can set the MaxBytes = -1 instead of a range between 0 to 8000 to get up to 2gb of space. I believe that this was something new they added in the 3.5 framework because there are various articles out there talking about this 8000 byte limitation.

Thank you all for you answers though as this is a problem I’ve wanted to solve for other reasons in the past and now I know what to do if I need a really easy and fast way to communicate between apps.

  • 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-26T18:00:43+00:00Added an answer on May 26, 2026 at 6:00 pm

    You can’t store this as in-memory data and have it shared between processes, since each process has it’s own isolated memory address space.

    One option, however, would be to use the .NET Memory-mapped file support to “store” the shared data. This would allow you to write a file that contained the information in a place that every process could access.

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

Sidebar

Related Questions

I want to initialize a static collection within my C# class - something like
So something like: public static class StaticClass {} public class InstanceClass { static StaticClass
I want something like an std::map , but I only want to see if
i want something like this the user enter a website link i need check
I want something like this: <msxsl:script language=C#> ??? getNodes() { ... return ... }
I want something like a canvas, but where i'd be able to manipulate pixels
:bn , :bp just switches buffers I want something like ctrl-o, which has a
Say I have the classic 4-byte signed integer, and I want something like print
How do I reset my numbers after they count? I want something like an
I want do something like this: Result = 'MyString' in [string1, string2, string3, string4];

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.