Sitecore 5.0 API

MainUtil.GetStringList Method 

Gets an array list of strings.

[Visual Basic]
Public Shared Function GetStringList( _
   ByVal allowEmptyStrings As Boolean, _
   ParamArray strings As String() _
) As ArrayList
[C#]
public static ArrayList GetStringList(
   bool allowEmptyStrings,
   params string[] strings
);

Parameters

allowEmptyStrings
Indicates if empty strings are added to the array.
strings
Strings

Return Value

An array list of the strings.

Example

  ArrayList list1 = StringUtil.GetStringList(true, new string[] { "Hello", "", "world"}); // "Hello", "", "world"
  ArrayList list2 = StringUtil.GetStringList(false, new string[] { "Hello", "", "world"}); // "Hello", "world"

See Also

MainUtil Class | Sitecore Namespace