Skip to content

Instantly share code, notes, and snippets.

View kiriappeee's full-sized avatar

Adnan Issadeen kiriappeee

View GitHub Profile
@kiriappeee
kiriappeee / Program.cs
Created November 26, 2011 16:02
Emulating 'LIKE' operator using Linq with arrays
/**
* If you search the internet I haven't seen much of a solution for people being able to emulate
* the LIKE operator in C# using LINQ with arrays. Most of the solutions run along the lines of working
* with the contains() method.
* But the LIKE operator is essentially somewhat of a dumbed down version of regex.
* In this example I have several class names and I wanted to know which classes match a particular
* pattern; the pattern I wanted to match was all classes ending with 'det'
* And given below is the working example of this as a console application.
**/
using System;