📅  最后修改于: 2022-03-11 14:52:02.210000             🧑  作者: Mango
Private Function SequentialNumbers(ByVal input As String) As Boolean
Dim numbers() As Int32 = Array.ConvertAll(input.ToCharArray(), Function(c) Convert.ToInt32(c))
For index As Int32 = 0 To numbers.Length - 2
For nestedIndex As Int32 = index + 1 To numbers.Length - 1
If numbers(index) = numbers(nestedIndex) - 1 Then
Return True
End If
Next
Next
Return False
End Function