共用方式為


ServiceDescriptionFormatExtensionCollection.IsRequired(Object) 方法

定義

傳回值,指出指定的物件對 XML Web Service 的作業是否為必須的。

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

XmlElementServiceDescriptionFormatExtension 型別的物件,要檢查它是否為必要的物件。

傳回

如果需要 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())

適用於