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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T12:30:52+00:00 2026-05-25T12:30:52+00:00

I have a question regarding using some features from the System.Linq.Dynamic assembly. I needed

  • 0

I have a question regarding using some features from the System.Linq.Dynamic assembly.

I needed using queries like “@”NOT (Person.Name = “”test””)” for example, now the problem is that I do not have a certain object type, but instead need reading the property names and their values (and may be types, though I actually must deduce the types from the values) … I solved this by using reflection (created the type and the properties as needed at runtime) …. but I still wonder whether that is possible without creating the types and properties, but using anonymuous types (I basically need to not have to enter those types, just the values … of course I can write code to find out the type of the value entered for ex it has quotes – that means it’s a string …), or if there is a another library in .Net for accomplishing this task (I did not have very much time for looking into the Dynamic class … how it’s working etc)
.

  • 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-25T12:30:53+00:00Added an answer on May 25, 2026 at 12:30 pm

    The Dynamic Linq parser always requires an actual type to parse against because it is parsing the dynamic expression into System.Linq.Expression expression trees, which are based on types. However, the Dynamic Linq library contains a method for quickly creating anonymous types like this at run time. Here is an example of using that (taken from the html documentation file that comes packaged with the DynamicLinq.cs file):

    DynamicProperty[] props = new DynamicProperty[] {
        new DynamicProperty("Name", typeof(string)),
        new DynamicProperty("Birthday", typeof(DateTime)) };
    Type type = DynamicExpression.CreateClass(props);
    object obj = Activator.CreateInstance(type);
    t.GetProperty("Name").SetValue(obj, "Albert", null);
    t.GetProperty("Birthday").SetValue(obj, new DateTime(1879, 3, 14), null);
    Console.WriteLine(obj);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a question regarding the integration of business objects developed using Linq To
I have a question regarding implementation of smart-search features. For example, consider something like
I have some question regarding database performance in general. I'm using Sqlite but I
I have a question regarding using Semaphores HANDLE WINAPI CreateSemaphore(...); Is there anyway I
I have a question regarding the method i am using for doing Business Rule
I have a question regarding use of FFT. Using function getBand(int i) with Minim
i have a question regarding some complex data-binding. I want to be able to
I am new in Fortan and have a question regarding using make callback-functions available
I have a question regarding using intptr_t vs. long int . I've observed that
I have a question regarding the development of liferay portlets using the liferay plugin

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.