コード例 #1
0
ファイル: DBString.cs プロジェクト: bmadarasz/ndihelpdesk
 // --------------------------------------------------------------------------------
 /// <summary>
 /// Identifies the substrings in this instance that are delimited by one or more 
 /// characters specified in an array, then places the substrings into a 
 /// String array. A parameter specifies the maximum number of array elements 
 /// to return.
 /// </summary>
 /// <param name="separator">Array of separator characters</param>
 /// <param name="count">Maximum number of strings to be returned.</param>
 /// <returns>Array of splitted strings</returns>
 // --------------------------------------------------------------------------------
 public DBString[] Split(char [] separator, int count)
 {
     String [] substrings = m_Value.Split (separator, count);
       DBString [] dbsubstrings = new DBString [substrings.Length];
       int index = 0;
       foreach (String element in substrings)
       {
     dbsubstrings.SetValue (element, index ++);
       }
       return dbsubstrings;
 }