C# LINQ — “Where”

LINQ (Language-Integrated Query) is a set of integrated C# capabilities which allow queries against data.

Today’s Objective: Explore the capabilities and usage of the LINQ Where method to search collections for met conditions.

The Where Method:

The Where method of LINQ can filter a collection of data, and return a new collection containing only the data values which meet the condition/s specified in the Where call.

Microsoft Documentation

An Example:

Of course, the Where method doesn’t only apply to character count.

The Where method makes it super easy to filter and search through data based on a huge range of possible conditions. The syntax is simple to learn, understand and use.

The Syntax:

--

--

--

Unity game developer / C# Programmer / Gamer. Australian (Tasmanian) indie games developer for 10+ years. Currently looking for games industry employment.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Make your business logic readable, and your configuration logic extendable

How did we comfort our new architecture decisions in a Serbian conference

Github Action Watcher

Physical Prototyping vs Code Prototyping

MacOS EC2 Instance integrated as Jenkins node for iOS build and test

Top web designing course in Noida sec 18

File upload HTTP server — practical guide

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Vincent Taylor

Vincent Taylor

Unity game developer / C# Programmer / Gamer. Australian (Tasmanian) indie games developer for 10+ years. Currently looking for games industry employment.

More from Medium

C# Refreasher: Dictionaries!

Unity C#: Lists

C# Building Blocks: Methods