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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T05:04:19+00:00 2026-06-11T05:04:19+00:00

I am working on a dynamic Lambda expression query, without using an API. If

  • 0

I am working on a dynamic Lambda expression query, without using an API.

If the user selects the FieldName as “AddressLine1” and Operator as >= FieldValue as “K”
It should return the results as All the AddressLine1 Field values which starts with K and L,M till Z series.

Here is the code, it works for integer datatypes:

public static Expression CreateBinaryExpression(Expression argLeft, Expression argRight, operatorType opType) {
    switch ((operatorType)opType) {    
        case operatorType.Greater:
            return Expression.GreaterThan(argLeft, argRight);
        case operatorType.GreaterEqual:
            return Expression.GreaterThanOrEqual(argLeft, argRight);
        ...
    }
}

How to modify the code to work with String datatype for Greater than Equal operator. I am looking for expression for this. Anybody have ideas?

  • 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-06-11T05:04:21+00:00Added an answer on June 11, 2026 at 5:04 am

    You can use the String.Compare() method:

    return String.Compare(argLeft, argRight) >= 0;
    

    Compare() returns <0 if strA is less than strB, 0 when they are equal, and >0 if strA is greater than strB.

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

Sidebar

Related Questions

I have the following dynamic query which is working fine without the WHERE clause,
I m building dynamic lambda expression.I got the following operators working for this code
I am working on a dynamic search view wherein clicking a button should add
I am working on a dynamic web app using Eclipse with Tomcat 7 and
I have a working dynamic TableLayout that holds user data. Clicking an Add Event
I am working with dynamic tabs in jQuery . When the user opens a
I am working on dynamic page. Using {$pagetitle} smarty tag I get selectbox something
Following is a Paging enabled Query for SQL server, it is working well without
I'm working on a dynamic pivot query on a table that contains: OID -
Using this wiki I have a dynamic dropdownlist working just fine. Instead of the

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.