Beispiel #1
0
        public static string ToString(Ot1 ot)
        {
            StringBuilder sb = new StringBuilder();

            foreach (Ot1 value in Enum.GetValues(ot.GetType()))
            {
                if (ot.HasFlag(value))
                {
                    sb.Append(value.ToString() + ", ");
                }
            }
            if (sb.Length > 2)
            {
                sb.Length -= 2;
            }
            return(sb.ToString());
        }
 public static Ot3 MergeOt(Ot1 ot1, Ot1 ot2, Ot1 ot3)
 {
     return((Ot3)(((byte)ot1) | (((byte)ot2) << 4) | (((byte)ot3) << 8)));
 }
 public static Ot2 MergeOt(Ot1 ot1, Ot1 ot2)
 {
     return((Ot2)(((byte)ot1) | (((byte)ot2) << 4)));
 }