I have an iterator of objects and I have to take specific action if the item is of some type. That type is a friend class in the runtime, and therefore cannot be used in design-time.
So my question is, which of the following will cost less performance:
Private Const myType As String = "System.HiddenNameSpace.MyHiddenType"
Sub Compare()
For Each item In items
If item.GetType.FullName = myType Then
Else
End If
Next
End Sub
Or
Private Shared ReadOnly myType As Type = GetMyHiddenType()
Sub Compare()
For Each item In items
If item.GetType = myType Then
Else
End If
Next
End Sub