Share via


SecurityElement.IsValidText(String) 메서드

정의

문자열이 XML 요소 내의 텍스트로 유효한지 여부를 확인합니다.

public:
 static bool IsValidText(System::String ^ text);
public static bool IsValidText (string? text);
public static bool IsValidText (string text);
static member IsValidText : string -> bool
Public Shared Function IsValidText (text As String) As Boolean

매개 변수

text
String

유효성을 테스트할 텍스트입니다.

반환

Boolean

text 매개 변수가 유효한 XML 텍스트 요소이면 true이고, 그렇지 않으면 false입니다.

예제

다음 코드에서는 메서드를 사용 하 여 IsValidText 문자열이 XML 요소 텍스트로 유효한 지 여부를 확인 하는 방법을 보여 줍니다. 이 코드 예제는에 대해 제공 된 큰 예제의 일부는 SecurityElement 클래스입니다.

if (  !SecurityElement::IsValidText( tagText ) )
if (!SecurityElement.IsValidText(tagText))
If Not SecurityElement.IsValidText(tagText) Then

설명

이 메서드를 설정 하기 전에 테스트 하는 데 사용할 수 있습니다 Text .

적용 대상