Esempio n. 1
0
        private static int GetIndex2(HSSFColor color)
        {

            FieldInfo f;

            f = color.GetType().GetField("index2", BindingFlags.Static | BindingFlags.Public);
            if (f == null)
            {
                return -1;
            }

            short s;
            try
            {
                s = (short)f.GetValue(color);
            }
            catch (ArgumentException)
            {
                throw;
            }
            catch (InvalidOperationException)
            {
                throw;
            }
            return Convert.ToInt32(s);
        }