コード例 #1
0
ファイル: SelectFormat.cs プロジェクト: NightOwl888/ICU4N
 /// <summary>
 /// Sets the pattern used by this select format.
 /// Patterns and their interpretation are specified in the class description.
 /// </summary>
 /// <param name="pattern">The pattern for this select format.</param>
 /// <exception cref="ArgumentException">When the <paramref name="pattern"/> is not a valid select format pattern.</exception>
 /// <stable>ICU 4.4</stable>
 public virtual void ApplyPattern(string pattern)
 {
     this.pattern = pattern;
     if (msgPattern == null)
     {
         msgPattern = new MessagePattern();
     }
     try
     {
         msgPattern.ParseSelectStyle(pattern);
     }
     catch (Exception)
     {
         Reset();
         throw;
     }
 }