GlobalConfig.GetIfCollection Method (PIA)
Use this method to convert values read from the Fields property into appropriate objects such as a SimpleList object or a System.Array object. If the encoding in the string contained in the Fields property indicates a SimpleList object, then a SimpleList object is returned. If the encoding indicates a System.Array object, then a System.Array object is returned. If no collection object is indicated, then the method returns the original encoded input string.
Definition
[Visual Basic .NET]
Imports Microsoft.CommerceServer.Interop.Configuration
…
Public Function GetIfCollection(ByRefstrList As Object) As Object
[C#]
using Microsoft.CommerceServer.Interop.Configuration;
…
public object GetIfCollection(ref objectstrList);
Parameters
[Visual Basic .NET]
- strList
An Object that contains the encoded string to be converted.
[C#]
- strList
An object that contains the encoded string to be converted.
Return Values
[Visual Basic .NET] If this method completes successfully, it returns an Object containing the converted data in the appropriate data type.
[C#] This method returns an object containing the converted data in the appropriate data type.
Exceptions
This method may throw one of many mapped exceptions or an exception of type COMException. See Standard COM Errors for additional details.
[Visual Basic .NET]
Example
' oObject is an Object; oEncodedString is an Object
' oGlobalConfig is a Commerce GlobalConfig object
oObject = oGlobalConfig.GetIfCollection(oEncodedString)
Requirements
Namespace: Microsoft.CommerceServer.Interop.Configuration
Platforms: Windows 2000, Windows Server 2003
Assembly: cs_mscscfg (in cs_mscscfg.dll)
See Also
Copyright © 2005 Microsoft Corporation.
All rights reserved.