Hi Mike,
When we add a setting in the Settings tab in a project's Project designer
and select System.Collections.ArrayList as the type of the setting, we
could click the cell under the Value column in the same row and click the
button on the right to edit the items in the collection.
In the Object Collection Editor dialog, if we click Add button, a new item
of type System.Object is added to the collection. However, we couldn't
modify the value of the object, because the properties grid on the right
hand is grey. Click ok button and close the dialog. We could see an xml
text appears in the Value cell. The content of the xml text is like below.
<?xml version="1.0" encoding="utf-16"?>
<ArrayOfAnyType xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="
http://www.w3.org/2001/XMLSchema">
<anyType/>
</ArrayOfAnyType>
So we could only modify content in the <anyType> node in the above xml text
to specify the default values of items in the ArryList setting. The
following is a sample.
<?xml version="1.0" encoding="utf-16"?>
<ArrayOfAnyType xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="
http://www.w3.org/2001/XMLSchema">
<anyType xsi:type="xsd:int">1</anyType>
<anyType xsi:type="xsd:string">2</anyType>
<anyType
xsi:type="xsd:dateTime">2006-09-06T10:58:55.4961857+08:00</anyType>
</ArrayOfAnyType>
Copy the new xml text back to the Value cell of the setting.
In the above sample, three items are added in the collection, among which
the first item is of type Int32 with the value of 1 and the second item is
of type String with the value of "2" and the third item is of type DateTime
with the value of "2006-09-06 10:58:55".
Hope this helps.
If you have anything unclear, please feel free to let me know.
Sincerely,
Linda Liu
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.