Ignore case in IF comparision

case-sensitive, if-statement, ignore-case, vb.net, visual-studio

Solution

Convert the extension to lowercase using ToLower and then compare

If file.Extension.ToLower = ".lnk" Then MsgBox(file.Extension)

And forget Regex for this. It's really overkill and inappropriate

Problem

Is there an easy way to do this comparision with ignorecase ON? ``` If file.Extension = ".Lnk" Then MsgBox(file.Extension) ``` What i'm trying to do is to get all the ".lnk" or ".LNK" or ".lNk" or " ".Lnk" etc... I know this is possibly with RegEx but... there's an easy way for that example? Thankyou for read

Original source