SecurityElement.IsValidAttributeName(String) 메서드

정의

문자열이 유효한 특성 이름인지 여부를 확인합니다.

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

매개 변수

name
String

유효성을 테스트할 특성 이름입니다.

반환

Boolean

name 매개 변수가 유효한 XML 특성 이름이면 true이고, 그렇지 않으면 false입니다.

예제

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

if ( SecurityElement::IsValidAttributeName( attributeName ) &&
       SecurityElement::IsValidAttributeValue( attributeValue ) )
if (SecurityElement.IsValidAttributeName(attributeName) &&
    SecurityElement.IsValidAttributeValue(attributeValue))
If SecurityElement.IsValidAttributeName(attributeName) AndAlso SecurityElement.IsValidAttributeValue(attributeValue) Then

설명

이 메서드를 보안 요소에 추가 하기 전에 특성을 테스트 하는 데 사용할 수 있습니다.

적용 대상