Click here to Skip to main content
15,891,033 members
Everything / Expressions

Expressions

expressions

Great Reads

by Aram Tchekrekjian
More about pattern matching types with a usage example for each type
by n.podbielski
If you want to optimize code, which is based on Reflection, delegates may be the thing you are looking for. In this part are explained generic methods and events.
by Martin-Hallonqvist
This article describes how I wrote a small Windows service for handling the task of sorting and renaming scanned (and run throgh OCR) documents depending on contents.
by Yuriy Magurdumov
PropertyMapper allows mapping object properties to string keys and accessing property values based on those string keys

Latest Articles

by Aram Tchekrekjian
More about pattern matching types with a usage example for each type
by Coral Kashri
Fold-expressions in extreme cases
by Kamran Saeedi
An idea on how to use .NET ExpressionVisitor to translate lambda expressions into classes that encapsulate data suitable for filtering data & creating query strings
by Mayank_Gupta_
Immediately Invokable Function Expressions in JavaScript

All Articles

Sort by Score

Expressions 

11 Sep 2023 by Aram Tchekrekjian
More about pattern matching types with a usage example for each type
6 Sep 2016 by n.podbielski
If you want to optimize code, which is based on Reflection, delegates may be the thing you are looking for. In this part are explained generic methods and events.
14 Aug 2013 by Martin-Hallonqvist
This article describes how I wrote a small Windows service for handling the task of sorting and renaming scanned (and run throgh OCR) documents depending on contents.
1 Oct 2014 by Yuriy Magurdumov
PropertyMapper allows mapping object properties to string keys and accessing property values based on those string keys
29 May 2014 by Randy Kroeger
Created a POC that dynamically builds a predicate using Expression and Reflection.
2 Jul 2014 by TheCannyCoder
Introduction to functional programming in Java 8
20 Sep 2015 by PIEBALDconsult
Right, well obviously that method can't handle C/C++/C# syntax; it's actually pretty limited in what it can do.Fortunately, .net allows you to compile code at run-time. There are several articles here on CP, including mine: Compiling Source Code from a String[^]
27 Aug 2015 by Zoltán Zörgő
STA(.*?)M2 is enough, but you need to enable Singleline[^].var s = @"STA;12345;325-5899ML;2222;5555;GHAA-;5881;2K5K1KKLM2;KKN;11232";var re = new Regex("STA(.*?)M2", RegexOptions.Singleline);Console.WriteLine(re.Matches(s)[0].Groups[1].Value);Yields:...
26 Jul 2018 by Richard Deeming
The inner lambda expression will have access to the parameters from the outer lambda expression: var x = Expression.Parameter(typeof(Widget), "x"); var y = Expression.Parameter(typeof(Role), "y"); var z = Expression.Parameter(typeof(RoleAction), "z"); // z => !x.IsActive || z.IsActive var...
2 Aug 2020 by Sandeep Mewara
You need to add a 'Total' row at the bottom of your report design instead of a column. Refer: Sum of Column Values in Reports Automatically Using Expression in .NET[^]
20 Sep 2015 by Maciej Los
In addition to soultion 1 by PIEBALDconsult[^]...Computed column of DataTable object can accept quite difficult expression[^], but it is limited to these operators:ANDORNOT==INLIKEThe following arithmetic operators are also supported in expressions:+...
4 Dec 2012 by sadomovalex
Shows how using reverse engineering feature developers may add new conditions into string CAML queries using lambda expressions.
27 Dec 2012 by shantanufrom4387
How can I compare a variable with NULL in SSIS expression?@[User::FilesExist]==Null
19 Jul 2013 by lewax00
The above ones seem like a bit much to me...how about just:^[^0]*$
11 Oct 2013 by ASP.NET Community
There are three terms around Internationalization that are often used interchangably, however they are distinctions. Here's a good
11 Oct 2013 by ASP.NET Community
DLR Expression is the backbone of the DLR. It is a separate feature that you can use without involving the rest of the DLR.Let’s take a look at
12 Mar 2014 by FarhanShariff
I want to put Minimum Value of (cpKL,cpKR) into cpK How to write the expression for cpKsigma.Expression = "(Convert(point90,'System.Double')-Convert(point10,'System.Double'))/2.56";cpKL.Expression = "(Convert(point50,'System.Double')-...
23 Apr 2014 by Jens Madsen, Højby
Trying to get into Expressions, IL-Generated Delegates etc.I have this prototype for combining 'Comparisons', but I think it's quite slow, even with just 2-3 Funcs:(I use VB -- sorry ;) ) Public Function BuildCompareExpression(Of T)(exp1 As Expression(Of Func(Of T, T, Integer)), exp2...
14 Sep 2014 by Simba Mukodzani
I have a piece of code like the following....Delegate Function CreateObject(Of I)(Object context) As IClass Container Property ReadOnly ObjectType() As TypeEnd ClassClass Container(of I) Inherits Container Property ReadOnly Creator() As CreateObject(Of I)End...
17 Nov 2014 by Prasaad SJ
Hi, I am using entity framework in my application. Consider I am having a following table structureEmployee(ID uniqueidentifier,Name varchar(100) not null,JobId uniqueidentifier null)I am using the following expression to get the dataExpression>...
17 Nov 2014 by Shweta N Mishra
replace the NULL with 0 in both side of where condition.something like Isnull(JobID,0)=Isnull(jobIdVariable,0).You would have to convert above expression as per the language requirement.
22 Nov 2014 by Prasaad SJ
After few trial attempts, I could find the solution for this question. If the type is of nullable type, then in expression we have use both Equals and == . Eg: In my above case in the question, its working correct when Expression> predicate;if(JobIdVariable==null){ ...
28 May 2015 by Member 11581003
I have a table that stores Referral details - it includes fields like Referral Type, Referral Date, OffenderID, OfficerID etc.) And obviously some Offenders are referred more than once (multiple times) and likewise, OfficerID also repeats in the table as many offenders are referred by the same...
28 May 2015 by Sascha Lefèvre
To give you a fully working query I would have to know how your Offender- and Officer-Tables/Entities look like. So I'll make a good guess here instead and to illustrate I include all the code I wrote to test it. You obviously can discard everything except the query at the bottom. I assume...
27 Aug 2015 by Otsep
Hello Community,i need your help ;-)My input string:Row1: STA;12345;325-5899Row2: ML;2222;5555;GHAARow3: -;5881;2K5K1KKLRow4: M2;KKN;11232Now i want to get the string from "STA" to "M2".The following i tryed and it failed:STA(?s)([\S\s]*)M2Do you have a brillant...
20 Sep 2015 by iSahilSharma
Update - I was trying to evaluate an expresion in C# using the DataTable.Compute() method and found that instead of using ternary operator(?,: ), I should've used the IFF(expression, truepart, falsepart). So I'm trying to convert the whole expression into the IFF format and need a little help to...
18 Nov 2015 by Oliver S. Neven
Hello there! (Sorry if I have some grammatical errors, english is not my native language, but I try my best!)I'm currently trying to write a program that compiles a string containing an arithmetic expression and solves / evaluates it. I'm not looking for code or libraries, I just want to get...
18 Nov 2015 by Patrice T
There is no solution/answer to your question.Quote:I could paste the code, but I see no point since I've just explained basically the whole program.This is where you are wrong. You gave us a vague general speak about expression compilation that can apply to almost any program or technique used...
20 Nov 2015 by Oliver S. Neven
I figured out how to do it by following these tutorials!https://www.youtube.com/watch?v=vXPL6UavUeA&list=LLAbEvqKZEqYBAmzzgVbKojQ&index=2[^]https://www.youtube.com/watch?v=MeRb_1bddWg&list=LLAbEvqKZEqYBAmzzgVbKojQ&index=3[^]Thanks for all your responds. :)
26 Jul 2018 by Alex-1978
I'm working with Entity Framework and need to create filters dynamically in run time. I need to create an expression which should be able to access parameter of a parent call, e.g.: x => x.Roles.Select(y => y.Actions.Where(z => !x.IsActive || z.IsActive)) so that this filter should select _all_...
25 Jul 2018 by Gerry Schmitz
"x" is in scope. class RoleAction { public bool IsActive; } class Role { public List Actions = new List(); } class Widget { public List Roles = new List(); public bool IsActive; } class Program { static...
2 Aug 2020 by Member 14898617
In my RDLC report i am trying to create a table where i want summarise the count Containing YES & NO in "Issued_to_Maintanance" column. For this i have created first column by entering YES & NO manually and for the next column i have entered this...
22 May 2023 by Coral Kashri
Fold-expressions in extreme cases
22 May 2020 by Kamran Saeedi
An idea on how to use .NET ExpressionVisitor to translate lambda expressions into classes that encapsulate data suitable for filtering data & creating query strings
27 Feb 2017 by n.podbielski
If you want to optimize code, which is based on Reflection, delegates may be the thing you are looking for.
7 Apr 2017 by n.podbielski
If you want to optimize code, which is based on Reflection, delegates may be the thing you are looking for. In this part are explained methods and constructors.
29 Jan 2013 by Florian Rappl
An introduction to lambda expressions as well as an advanced discussion on how and where to use them. This article will also show known and introduce new design patterns that might be helpful.
14 Aug 2014 by TheCannyCoder
Java 8 is perhaps one of the most exciting editions of the Java language in recent times. One of the headline features is support for functional programming which is the focus of this blog. The support comes mostly in three features: Support for [work pipeline] streams. Streams allow us to process d
15 Jan 2015 by Bhushan Mulmule
This write-up will take you through all the steps that are required to understand lambda expression thoroughly.
19 Nov 2013 by sadomovalex
Describes support for IN CAML operation in Camlex open source library for Sharepoint developers
15 Jun 2017 by Mayank_Gupta_
Immediately Invokable Function Expressions in JavaScript
20 Dec 2015 by ASP.NET Community
Lambda expressions provide a concise, functional syntax for writing anonymous methods. They are super useful when writing LINQ query expressions.
12 Mar 2014 by Manikandan K
then try separately, like this, first check which is smaller and assign that to a 3rd variable say cp,if(cpKL
12 Mar 2014 by FarhanShariff
cpK.Expression = "IIF(cpKL
12 Mar 2014 by Manikandan K
Try this, cpK.Expression = (cpKL
19 Jul 2013 by Arpit Shrivastava
Just add ^(?!0$)$ to your regular expression. It will not allow zeros at all...
19 Jul 2013 by ridoy
Check ^(?=.*[1-9])\d*\.?\d*$
8 Nov 2021 by Arvin Donner
I am working on a partitioning problem. I am looking to partition an entire table using three different ranges: ColumnA > 0.0 ColumnA