ServiceDescriptionFormatExtensionCollection.IsRequired(Object) 方法

定义

返回一个值,该值指示指定的对象是否对于 XML Web services 的操作是必需的。

public:
 bool IsRequired(System::Object ^ item);
public bool IsRequired (object item);
member this.IsRequired : obj -> bool
Public Function IsRequired (item As Object) As Boolean

参数

item
Object

要检查其是否必要的对象,该对象为 XmlElement 类型或 ServiceDescriptionFormatExtension 类型。

返回

Boolean

如果 item 参数是必需的,则为 true;否则,为 false

示例

// Check 'IsRequired' status for 'myFormatExtensionObject' object in collection.
Console::WriteLine( "'IsRequired' status for {0} object is {1}.", myFormatExtensionObject, myCollection->IsRequired( myFormatExtensionObject ) );
// Check 'IsRequired' status for 'myFormatExtensionObject' object in collection.
Console.WriteLine("'IsRequired' status for {0} object is {1}.",
         myFormatExtensionObject.ToString(),
         myCollection.IsRequired(myFormatExtensionObject).ToString());
' Check 'IsRequired' status for 'myFormatExtensionObject' object in collection.
Console.WriteLine("'IsRequired' status for {0} object is {1}.", _
        myFormatExtensionObject.ToString(), _
        myCollection.IsRequired(myFormatExtensionObject).ToString())

适用于