ServiceDescriptionFormatExtensionCollection.IsRequired(Object) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
傳回值,指出指定的物件對 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
XmlElement 或 ServiceDescriptionFormatExtension 型別的物件,要檢查它是否為必要的物件。
傳回
如果需要 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())