SecurityElement.IsValidAttributeValue(String) メソッド

定義

文字列が有効な属性値かどうかを判断します。

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

パラメーター

value
String

有効性をテストする属性値。

戻り値

value パラメーターが有効な XML 属性値の場合は true。それ以外の場合は false

次のコードは、 メソッドを使用して、 IsValidAttributeValue 文字列が有効な属性値であるかどうかを判断する方法を示しています。 このコード例は、SecurityElement クラスのために提供されている大規模な例の一部です。

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

注釈

このメソッドを使用して、属性をセキュリティ要素に追加する前にテストできます。

適用対象