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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T14:47:01+00:00 2026-05-12T14:47:01+00:00

When I try try to access a string property in one of my C#

  • 0

When I try try to access a string property in one of my C# project resources, I get the following error:

'ORG.PRJ.MOD.MyClass2' does not contain a definition for 'Properties'

The code that produces the error is:

string s = MyClass2.Properties.Resources.TestString2;

The really bizarre thing is that another project in my solution (using MyClass and TestString) with exactly the same setup does NOT produce the error and works like a champ. Here is the background and all the things I have tried.

  1. Both are plain “Class Library C#” projects in VS2008.
  2. I created the resource strings via right-click->Properties for each project in the solution tree, then selecting the “Resources” tab. Then I just entered a “TestString” in one, and a “TestString2” in the other.
  3. For the project that works, if I type MyClass. – the IDE IntelliSense tells me that “Properties” is an available member (but that is the ONLY member it shows me). For the project that doesn’t work, the available members are “Equals” and “ReferenceEquals” (it does NOT give me “Properties”). This seems to be the biggest clue that SOMETHING is different.
  4. Thinking my project files got corrupted, I completely created both projects again from scratch. I deleted all bin, obj, and Properties folders, deleted all Resources.resx and Resources.Designer.cs files, deleted all .csproj, .csproj.user, .sln, and .suo files. For BOTH projects. Then I started up VS2008 again and used File->New->”Project From Existing Code…” to create new projects. Then I added the resources in exactly the same way for both projects (per Step 2 above). Same results.
  5. I have performed a ‘diff’ on the corresponding files between the two projects (Resources.resx, Resources.Designer.cs, MyProj.csproj). Nothing looks different other than what I would expect (class names and string names differ between them).
  6. I’ve googled it to death. Based on how bizarre this feels, there’s no doubt I’ve done something insanely stupid (see https://stackoverflow.com/questions/58640/great-programming-quotes/756768#756768).
  • 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-12T14:47:01+00:00Added an answer on May 12, 2026 at 2:47 pm

    The Properties static class is accessible via the default namespace for your project. Now, given that it’s a class library, that might be Class2 (or perhaps that there might be a naming clash, ie. by having a Class2.Class2), but something tells me that that is a class in your library, not the namespace (which would produce the error you describe).

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

Sidebar

Related Questions

If I try and access some random string in the URL of my rails
I use query string to access my pages. I try to make if anyone
i try to put a lock to a static string object to access to
My app crash when I try to access any property of my NSDecimalNumber amount_before_current_year:
The error message I gen when I try to access the web page server
If we make any class in VB.NET and try to access its property in
I have a base class that has the following property: public virtual Dictionary<String, int>
When you try to access a key which isn't in a Dictionary (for example),
When I try to access info that is not presented in xml like so:
I keep getting compiler errors when I try to access flashVars in an AS3

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.