This documentation is archived and is not being maintained.

DiscoveryExceptionDictionary.Item Property

Gets or sets the Exception that occurred while discovering the specified URL from the DiscoveryExceptionDictionary.

[C#] In C#, this property is the indexer for the DiscoveryExceptionDictionary class.

[Visual Basic]
Public Default Property Item( _
   ByVal url As String _
) As Exception
[C#]
public Exception this[
 string url
] {get; set;}
[C++]
public: __property Exception* get_Item(
 String* url
);
public: __property void set_Item(
 String* url,
   Exception*
);
[JScript]
returnValue = DiscoveryExceptionDictionaryObject.Item(url);
DiscoveryExceptionDictionaryObject.Item(url) = returnValue;
-or-
returnValue = DiscoveryExceptionDictionaryObject(url);
DiscoveryExceptionDictionaryObject(url) = returnValue;

[JScript] In JScript, you can use the default indexed properties defined by a type, but you cannot explicitly define your own. However, specifying the expando attribute on a class automatically provides a default indexed property whose type is Object and whose index type is String.

Arguments [JScript]

url
The URL of the discovery document that caused an exception to be thrown during XML Web services discovery.

Parameters [Visual Basic, C#, C++]

url
The URL of the discovery document that caused an exception to be thrown during XML Web services discovery.

Property Value

An Exception that was thrown discovering url.

Exceptions

Exception Type Condition
ArgumentNullException url is a null reference (Nothing in Visual Basic).

Example

[Visual Basic] 
Dim myException As Exception = myExceptionDictionary(myUrlKey)
Console.WriteLine(" Source : " + myException.Source)
Console.WriteLine(" Exception : " + myException.Message)

[C#] 
Exception myException = myExceptionDictionary[myUrlKey];
Console.WriteLine(" Source : " + myException.Source);
Console.WriteLine(" Exception : " + myException.Message);

[C++] 
Exception* myException = myExceptionDictionary->Item[myUrlKey];
Console::WriteLine(S" Source : {0}", myException->Source);
Console::WriteLine(S" Exception : {0}", myException->Message);

[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button Language Filter in the upper-left corner of the page.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

DiscoveryExceptionDictionary Class | DiscoveryExceptionDictionary Members | System.Web.Services.Discovery Namespace

Show: