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

  • Home
  • SEARCH
  • 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 556713
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T11:56:56+00:00 2026-05-13T11:56:56+00:00

We have a requirement to provide user friendly descriptions for types. We have a

  • 0

We have a requirement to provide user friendly descriptions for types. We have a created a resource file which maps the type to a description.

The full name of the instance with the dots replaced with underscores is used as the key.
The description is a string and contains templates that refer to property in the instance.

When we get an instance, we get its type, get the key, and use it to find the resource value. Then use regex to pull out those template properties. Then use reflection to actually get the value of the property.

for eg.
The instance may be Address
the key would be MyNameSpace_MyPublicTypes_Address(say the full name is’MyNameSpace.MyPublicTypes.Address ‘)

The description can be ‘User stays in {State.City} in {Country}’ — State and Country are properties on the Address class. The State has a property City.

Is it possible to have something like
‘obj=>obj.State.City’ or ‘obj=>obj.Country’ ? or some sort of expression ?

I am using obj because it is the reflected instance.

Appreciate any help. Not sure if this question has been asked before.

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

    This is pretty-much what the dynamic LINQ library (one of the .NET 3.5 samples) does. The source is all available, or for usage see here. You should be able to trace the code that parses the strings into Expressions. Of course, it isn’t hard to split on . and assemble it manually; I have a dynamic OrderBy implementation here that does this.

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

Sidebar

Related Questions

When the user checks-in a Java file, I have a requirement to update the
We have a requirement to draw a number line much similar to what is
I have a textbox with calendar button. Here my requirement is I need to
I am currently writing a program which takes user input and creates rows of
I have been using WPF and its built in validation controls for quiet sometime.
I have the following situation in my cube: Shop A uses calendar Cal1. Their
I'm trying to perform two-way data binding on the controls in my user control,
This question is more towards Design and Architecture and I want to know SO
I want to apply operations from the OpenCV computer vision library, in real time,
I am implementing pagination for ListView in Android . I am extending the BaseAdapater

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.