title: How can I match custom PropertyGrid BrowsableAttributes entries?
body: <p>I have a class(KeywordProperties) with this code :</p>
  
  <pre><code>public class KeywordProperties
      {
          [DisplayMode("0-1,0-2,0-3,1-1,1-2,1-3,1-6,1-9,1-10,1-11,1-12,2-1,2-2,2-3,2-9,2-10,2-12,3-1,3-2,3-3,3-10,3-12,4-13,5,6")]
          public string Onvaan { get; set; }
  
          [DisplayMode("0-1,0-2,0-3,1-1,1-2,1-3,1-6,1-9,1-10,1-11,1-12,2-1,2-2,2-3,2-9,2-10,2-12,3-1,3-2,3-3,3-10,3-12,4-13,5,6")]
          public string MozooKolli { get; set; }
  
          [DisplayMode("0-10,1-10,3-10,3-12,5,6")]
          public string EsmeDars { get; set; }
  
          [DisplayMode("0-1,1-1,2-1,2-2,3-1,6")]       
          public string Sokhanraan { get; set; }
  
          [DisplayMode("0-10,1-2,2-1,2-10,3-10,6")]
          public string Modares { get; set; }
  }
  </code></pre>
  
  <p>And I have another for check attributes :</p>
  
  <pre><code>[AttributeUsage(AttributeTargets.Property, AllowMultiple = false, Inherited = true)]
  public class DisplayModeAttribute : Attribute
  {
      private readonly string mode;
      public DisplayModeAttribute(string mode)
      {
          this.mode = mode ?? "";
      }
      public override bool Match(object obj)
      {
          var other = obj as DisplayModeAttribute;
          if (other == null) return false;
  
          if (other.mode == mode) return true;
  
          // allow for a comma-separated match, in either direction
          if (mode.IndexOf(',') &gt;= 0)
          {
              string[] tokens = mode.Split(',');
              if (Array.IndexOf(tokens, other.mode) &gt;= 0) return true;
          }
          else if (other.mode.IndexOf(',') &gt;= 0)
          {
              string[] tokens = other.mode.Split(',');
              if (Array.IndexOf(tokens, mode) &gt;= 0) return true;
          }
          return false;
      }
  }
  </code></pre>
  
  <p>I want display properties in propertygrid with this code :</p>
  
  <pre><code>String Code = "":
  KeywordProperties Kp = new KeywordProperties();
  propertygrid1.SelectedObject = Kp;
  propertygrid1.BrowsableAttributes = new AttributeCollection(new DisplayModeAttribute(Code));
  </code></pre>
  
  <p>When Code vlue is "0-1" or "5" or ...(single value), I can see my properties.
  But, when use "0-1,1-2" for Code, I can't see any thing in my properygrid. </p>
  
  <p>How can I see these data :</p>
  
  <p>1- All properties that have code <strong>0-1 and</strong> code <strong>1-2</strong> : </p>
  
  <p>result is :<strong>Onvaan,MozooKolli</strong></p>
  
  <p>2- All properties that have code <strong>0-1 or</strong> code <strong>1-2</strong> : </p>
  
  <p>result is : <strong>Onvaan,MozooKolli,Sokhanraan,Modares</strong></p>