Name プロパティによって指定された Service を取得します。
[C#] C# では、このプロパティは ServiceCollection クラスのインデクサになります。
Overloads Public Default ReadOnly Property Item( _
ByVal name As String _) As Service
[C#]
public Service this[stringname] {get;}
[C++]
public: __property Service* get_Item(String* name);
[JScript]
returnValue = ServiceCollectionObject.Item(name);またはreturnValue = ServiceCollectionObject(name);
[JScript] JScript では、この型で定義されている既定のインデックス プロパティを使用することができます。しかし、独自のインデックス プロパティを明示的に定義することはできません。ただし、このクラスの expando 属性を指定すると、既定のインデックス プロパティが提供されます。提供されるインデックス プロパティの型は Object 型であり、インデックス型は String になります。
引数 [JScript]
- name
返された Service の名前。
パラメータ [Visual Basic, C#, C++]
- name
返された Service の名前。
プロパティ値
Service 。
使用例
' Create a new XmlTextWriter with specified URL.
Dim myXmlReader As New XmlTextReader("All_VB.wsdl")
Dim myServiceDescription As ServiceDescription = _
ServiceDescription.Read(myXmlReader)
myServiceDescription.TargetNamespace = "http://tempuri.org/"
' Remove the service named MathService.
Dim myServiceDescriptionCollection As ServiceCollection = _
myServiceDescription.Services
myServiceDescriptionCollection.Remove( _
myServiceDescription.Services("MathService"))
[C#]
// Create a new XmlTextWriter with specified URL.
XmlTextReader myXmlReader = new XmlTextReader("All_CS.wsdl");
ServiceDescription myServiceDescription =
ServiceDescription.Read(myXmlReader);
myServiceDescription.TargetNamespace = "http://tempuri.org/";
// Remove the service named MathService.
ServiceCollection myServiceDescriptionCollection =
myServiceDescription.Services;
myServiceDescriptionCollection.Remove(
myServiceDescription.Services["MathService"]);
[C++]
// Create a new XmlTextWriter with specified URL.
XmlTextReader* myXmlReader = new XmlTextReader(S"All_CS.wsdl");
ServiceDescription* myServiceDescription =
ServiceDescription::Read(myXmlReader);
myServiceDescription->TargetNamespace = S"http://tempuri.org/";
// Remove the service named MathService.
ServiceCollection* myServiceDescriptionCollection =
myServiceDescription->Services;
myServiceDescriptionCollection->Remove(
myServiceDescription->Services->Item[S"MathService"]);
[JScript] JScript のサンプルはありません。Visual Basic、C#、および C++ のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン をクリックします。
必要条件
プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ
参照
ServiceCollection クラス | ServiceCollection メンバ | System.Web.Services.Description 名前空間 | ServiceCollection.Item オーバーロードの一覧