user6051680
user6051680

Reputation:

LINQ syntax error in VB

I am not familiar with VB and just converted my code online from C# to VB !

m_sDir = New [String](m_sDir.Where(Function(c) (c >= 50) AndAlso (c <= 112)).ToArray())

but compiler is saying it can't do comparison between character and integer. So how should I update that code above?

Upvotes: 0

Views: 46

Answers (1)

Ry-
Ry-

Reputation: 224877

The converter appears to have changed character literals to integers for some reason. "X"c is the character literal syntax in VB.NET.

m_sDir = New String(m_sDir.Where(Function (c) c >= "2"c AndAlso c <= "p"c).ToArray)

Upvotes: 1

Related Questions