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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T23:02:01+00:00 2026-05-13T23:02:01+00:00

Alright, so I know about the Settings.Properties.Default.* Stuff, but thats not what im trying

  • 0

Alright, so I know about the Settings.Properties.Default.* Stuff, but thats not what im trying to use.. I’m trying to develop my own class, ill show you:

public sealed class SettingsHolder<T>
{
   public SettingsHolder(){}
   public T Setting
   {
      get{ /*return setting*/ }
      set( /*store setting*/  }
   }
}

so then i could compile that to a dll, and reference it in an application, and do something like this

SettingsHolder<string> stringHolder = new SettingsHolder<string>();
stringHolder.Setting = "hello world";

and on next application launch

string welcome = stringHolder.Setting;

and welcome should = “hello world”.. is this at all possible? i had origannally tried to disect the actual properties.settings class, but with no luck

  • 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-13T23:02:01+00:00Added an answer on May 13, 2026 at 11:02 pm

    The .NET/VS settings framework already does exactly what you indicate that you’re trying to do, without the clumsy runtime casts and generic classes. Absent a very compelling reason not to use it, that is what you should use. It already handles persisted user-level settings.

    If for some reason you absolutely cannot use that, either store the settings directly in a file somewhere in the user’s AppData, or use Isolated Storage. You will have to write your own persistence model for it.

    If an application could rewrite its own executable code on disk, it would raise all sorts of thorny questions about security and reliability. Besides, security restrictions on Vista and Windows 7 would prevent it from functioning correctly anyway – unless it’s a ClickOnce app, it’s probably installed in a program folder (i.e. Program Files), and you’d need a user with administrative privileges to elevate the process in order to make it work.

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

Sidebar

Related Questions

Alright I know there is a lot on here about this, but I haven't
Alright I know this is more than likely a amateur question but I have
Alright, i dont know how to explain it well.. but i have a switch
Alright, I know this question has been asked before, but mine has a different
Alright, I know questions like this have probably been asked dozens of times, but
Alright, probably not the best title, but meh. I have the following code inside
Alright, I know my title is a little obscure but it best describes the
Alright, nub question. I know. Basic response might be Convert.ToInt32(string); But naturally, C# does
Alright I know that the .closest() have been discussed before, but I have been
Alright, Im going about this, with what is probably a really complicated solution, but

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.