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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T11:09:23+00:00 2026-05-20T11:09:23+00:00

Based on http://www.thinkingguy.net/2010/01/localizing-labelfor-in-aspnet-mvc-2.html I’m trying to use reflection to get to a string property

  • 0

Based on http://www.thinkingguy.net/2010/01/localizing-labelfor-in-aspnet-mvc-2.html

I’m trying to use reflection to get to a string property in a resx file

   var propertyInfo = _resourceType.GetProperty(resourcePropertyName, BindingFlags.Static | BindingFlags.GetField | BindingFlags.NonPublic);

I have a resources folder in my MVC2 project with a resource file that autogenerated a Property

 public static string Dagrapport_Datum {
            get {
                return ResourceManager.GetString("Dagrapport_Datum", resourceCulture);
            }
        }

Whatever I pass to GetProperty It just stays null….
Any clues as to why this could be?

  • 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-20T11:09:24+00:00Added an answer on May 20, 2026 at 11:09 am

    Your BindingFlags doesn’t match with the signature of the property.

    You need BindingFlags.Static | BindingFlags.Public and maybe BindingFlags.GetProperty.

    Edit: Its better to set BindingFlags.NonPublic too.

    So GetProperty() searches for all Static, Public or NonPublic (internal, private, protected) properties.

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

Sidebar

Related Questions

I am trying to create a dropdown menu based on Stu Nicholls' : http://www.cssplay.co.uk/menus/pro_drop8.html
Based on the documents http://www.gnu.org/software/gsl/manual/html_node/Householder-Transformations.html and http://en.wikipedia.org/wiki/Householder_transformation I figured the following code would successfully
I am using the following regular expression (from http://www.simple-talk.com/dotnet/asp.net/regular-expression-based-token-replacement-in-asp.net/ ) (?<functionName>[^\$]*?)\((?:(?<params>.**?)(?:,|(?=\))))*?) it works fine,
I've wrote a functor library (based on the tutorial at: http://www.tutok.sk/fastgl/callback.html ). Currently, I
Based on this post http://www.adam-bien.com/roller/abien/entry/ejb_3_1_killed_the I use in my app @Named @Stateless bean for
Based on http://www.mredkj.com/javascript/nfbasic2.html , following code will result in 5.6e+2 . num = 555.55;
Seeing this: http://www.suckless.org/wiki.html . A wiki based on Mercurial. Are there any other non-code
Okay, I have some procedurally generated terrain (based loosely on http://www.swiftless.com/terraintuts.html ) Ive got
My current layout is based on this: http://www.cssplay.co.uk/layouts/body5.html It involves three columns which are
I have a simple web site ( http://www.kousenit.com/twitterfollowervalue ) that computes a quantity based

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.