NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

XmlAttributeCollection.Item (String)

Gets or sets the value of the attribute with the given name.

[C#] In C#, this member is the indexer for the XmlAttributeCollection class.

[Visual Basic]
Overloads Public Default Property Item( _
   ByVal name As String _
) As String
[C#]
public string this[
   string name
] {get; set;}
[C++]
public: __property String* get_Item(
   String* name
);
public: __property void set_Item(
   String* name,
   String*
);
[JScript]
returnValue = XmlAttributeCollectionObject.Item(name);
XmlAttributeCollectionObject.Item(name) = returnValue;
-or-
returnValue = XmlAttributeCollectionObject(name);
XmlAttributeCollectionObject(name) = 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 Item property whose type is Object and whose index type is String.

Arguments [JScript]

name
The name of the attribute to access.

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

name
The name of the attribute to access.

Remarks

When reading an attribute value, if the collection does not contain an attribute of the given name, the returned value is null.

When assigning an attribute value, if the new value is null, the given attribute is removed from the collection. Otherwise, if the collection does not contain the given attribute, a new attribute is added to the end of the collection.

See Also

XmlAttributeCollection Class | XmlAttributeCollection Members | System.Xml Namespace | XmlAttributeCollection.Item Overload List