2016-11-08 1 views
-3

"hello"문자열이 포함 된 텍스트 상자가 있다고 가정 해 보겠습니다.텍스트 상자의 특정 문자를 시각적 기본으로 확인 하시겠습니까?

textbox.text = "l"의 세 번째 문자를 확인할 수있는 방법이 있습니까?

우리는 시각적 기본에 대해 이야기하고 있습니다.

감사합니다.

+3

처럼이 기능을

Private Function checkCharacter(thisString As String, searchCharacter As Char, index As Integer) Try Return thisString(index) = searchCharacter Catch Return False End Try End Function 

전화를 사용할 수 있습니다. 이렇게하면 문제를 직접 해결할 수 없습니다. 또한 VB.NET IsNot vba – Plutonix

+0

[문자열에서 부분 문자열의 존재 여부 검색] (http://stackoverflow.com/documentation/vba/3480/searching-within-strings-for-the-presence-of-substrings#t= 201611081817391650478),이 페이지의 [Documentation] 버튼에서 찾으십시오. –

+0

[**'String.Chars()'속성 **] (https://msdn.microsoft.com/en-us/library/system.string.chars (v = vs.110) .aspx). –

답변

0

당신은 읽기 [질문]과 [투어]를하시기 바랍니다이

Dim result As Boolean = checkCharacter(TextBox1.Text, "l"c, 2) 
관련 문제