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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T13:32:55+00:00 2026-05-15T13:32:55+00:00

in my C# application i need to store huge amounts of constant strings in

  • 0

in my C# application i need to store huge amounts of constant strings in arrays, like one array for first names and one for last name and so on…

These strings never change so my question is how to store them ?

Make a static constant class with these arrays ?

Load them at runtime from somewhere?

Or any other solution…

PS: I don’t really want external files so if i load them from somewhere they have to be included in the .exe

EDIT://
So i just make resource files with string[] arrays, alrigt 🙂

  • 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-15T13:32:56+00:00Added an answer on May 15, 2026 at 1:32 pm

    In cases like this i use resource files.
    I create a resource file called Constants for example, and then i can call it from any where in my application.

    Also in past i did it twice to create a class which contains all variables as ‘const’.

      public const string myVariable = "some static text";
    

    but i felt its the wrong place to do that and started using resource files.

    Update: The Question is telling that the fixed strings are in string[] array, which is a case i didn’t remember i met, so don’t know which way will be better for you in this case regarding performance and code maintainability.

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

Sidebar

Related Questions

For my application I need to store some data in an array with the
I am creating a windows phone application, which need to store some data in
I am developing a geneology application, and I have a need to store dates
I need a way to store application-level data (i.e. cross user sessions) in ASP.NET.
In my application, i need to declare an Array based on the value stored
The application need write file's last modification date. void Dater(String DateFile) { File file
I need to implement caching in Asp.net web application My need to store data
I need to store my application config settings in a hierarchical format in web.config
I have a client application that creates an array of boolean arrays which I
I am developing an application in iPhone .This application need to store 3 music

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.