Consider grabbing the methodinfos for string.Contains, string.StartsWith and comparing against them rather than the name/argument counts you're using now.