LINQ expression until to break a string

Posted by wonea on Stack Overflow See other posts from Stack Overflow or by wonea
Published on 2010-06-16T09:36:23Z Indexed on 2010/06/16 9:42 UTC
Read the original article Hit count: 242

Filed under:
|
|

Using LINQ I'm looking to break down the following path string[], however I'd like to break it up to the point of the Binn folder. Is there a WHERE UNTIL operator in LINQ?

c:\ Program Files\ Microsoft SQL Server\ MSSQL10.SQLEXPRESS\ MSSQL\ Binn\ sqlservr.exe

What I'd like todo

var words = from word in thepath
where UNTIL thepath == "Binn"
select word;

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET