Compare strings by custom sort order Each letter represent a category. Example the group with "M" Code is greater Than "I" and "C" group. "F" is the higher group 

Here is what I did but I wonder if there is a better way to do it.

 Private Function CompareCode(ByVal code As String, ByVal otherCode As String) As Boolean
    Dim orderedCode As New List(Of String)
    orderedCode.Add("I")
    orderedCode.Add("C")
    orderedCode.Add("M")
    orderedCode.Add("F")

    Return orderedCode.IndexOf(code) &lt; orderedCode.IndexOf(otherCode)

End Function
Naming  

The name CompareCode does not express ll what this method is doing. Try to name it more meaningful.  

General  

You don't need a List(Of String) here. Add a private const string like  

Private Const orderedCode As String = "ICMF"
Private Function CompareCode(ByVal code As String, ByVal otherCode As String) As Boolean
    Return orderedCode.IndexOf(code) &lt; orderedCode.IndexOf(otherCode)
End Function