Example #1
0
 public object this[object key]
 {
     get
     {
         if (key is string)
         {
             return(st.GetAttribute((string)key));
         }
         return(null);
     }
     set
     {
         if (key is string)
         {
             st.RemoveAttribute((string)key);
             st.SetAttribute((string)key, value);
         }
         else
         {
             throw new InvalidOperationException();
         }
     }
 }