Questions

Answer for:

VB 6 covert to VB NET

Message 4 of 5

View entire thread
+
0 Votes
aikimark

If StrComp(strKey,".DEFAULT",vbCompareText)=0 Or StrComp(Right(strKey, 8),"_CLASSES",vbCompareText)=0 Then

============
You might also rewrite the second comparison as
strKey Like "*_CLASSES"

============
You can rewrite the If statement as
Select Case 0
Case StrComp(strKey, ".DEFAULT", vbCompareText) , StrComp(Right(strKey, 8), "_CLASSES", vbCompareText)

'Case Else 'optional equivalent to Else clause

End Select