I often use Linq to convert a list from one thing to another, but ran across this recently:
Option Strict On
Dim s As String = "d1, d2, d3, s4, s5"
Dim r As New Regex("[ds](\d)")
Dim Matches As MatchCollection = r.Matches(s)
For Each i As Integer In (From M As Match In Matches Select CInt(M.Groups(1).Value))
This works well when Option Strict is off, but I get a compile error when it's on: "Option Strict On disallows implicit conversions from 'Object' to 'System.Text.RegularExpres
I generally prefer Option Strict On, so does anyone knows how to fix this?