score:3
Accepted answer
The 'value' field is obviously a string since it's retained the leading zeroes. I've not tried but can you not cast the value as an integer before doing the comparison? Something like:
from t in table where (t => Convert.ToInt32(t) == 33) select t
If you need to keep the value as a string, you could use string.EndsWith() but you might have problems with matching the correct 'value'.
Source: stackoverflow.com
Related Articles
- LINQ Source Code Available
- creating Linq to sqlite dbml from DbLinq source code
- source code for LINQ 101 samples
- c# Linq or code to extract groups from a single list of source data
- Convert string[] to int[] in one line of code using LINQ
- Code equivalent to the 'let' keyword in chained LINQ extension method calls
- Linq code to select one item
- How are people unit testing code that uses Linq to SQL
- LINQ query to perform a projection, skipping or wrapping exceptions where source throws on IEnumerable.GetNext()
- Syntax to execute code block inside Linq query?
- Enumerable.Empty<T>().AsQueryable(); This method supports the LINQ to Entities infrastructure and is not intended to be used directly from your code
- Best open source LINQ provider
- Is there a good source that gives an overview of linq optimizations?
- Does this LINQ code perform multiple lookups on the original data?
- How to understand the following C# linq code of implementing the algorithm to return all combinations of k elements from n
- LINQ WHERE method alters source collection
- Where can I view LINQ source code?
- Suggestions for designing complex LINQ code
- Is there any way to create a LINQ query as a variable without having the data source (yet)?
- Left outer join using LINQ -- understanding the code
- How to pass LinQ Expressions from F# to C# code
- How to reuse a linq expression for 'Where' when using multiple source tables
- Avoiding code repetition when using LINQ
- Using LINQ to delete an element from a ObservableCollection Source
- How does linq actually execute the code to retrieve data from the data source?
- How can I switch that code to use LINQ
- How does this linq code that splits a sequence work?
- multiple orderby in this linq code
- How can I combine this code into one or two LINQ queries?
- Linq with where clause in many-to-many EF Code First object
- Why is this LINQ not finding an element two levels down?
- Convert sql to Lambda expression
- Add conditions after muilti join LINQ expression
- Passing in Func<T, bool> to LINQ Where
- Why doesn't Select() convert a IEnumerable<dynamic> to IEnumerable<StrongType>?
- Method based linq queries
- Domain logic vs data validation
- Why no exception occur on a wrong LINQ query in a task (query never ends in a task)
- Linq return all records from entity where a field contains one or more words from a list
- List<T> LINQ to JSON
- Gettiing last items using linq query
- Left outer Join with LINQ
- Trouble getting total count using .Take() and .Skip()
- parsing multiple elements from a node without knowing their names
- How to optimize a LINQ Where condition with Any(x => DbFunctions.Like())
- How to add a where clause that looks for an array of values
- WEB API Sequence contains no elements
- How to Convert Expr<'a -> 'b> to Expression<Func<'a, obj>>
- Changing DateTime format in lambda Expression
- Conditional linq query