Microsoft.Automata.CharacterEncodingTool.Truncate C# (CSharp) Méthode

Truncate() public static méthode

Maps ASCII to 7, extended ASCII to 8, and other encodings to 16. Throws AutomataException if IsSpecified(encoding) is false.
public static Truncate ( BitWidth encoding ) : int
encoding BitWidth
Résultat int
        public static int Truncate(BitWidth encoding)
        {
            switch (encoding)
            {
                case BitWidth.BV7: return 7;
                case BitWidth.BV8: return 8;
                case BitWidth.BV16: return 16;
                case BitWidth.BV32: return 16;
                case BitWidth.BV64: return 16;
                default:
                    throw new AutomataException(AutomataExceptionKind.CharacterEncodingIsUnspecified);
            }
        }
CharacterEncodingTool