LogMessage() private method

private LogMessage ( object message ) : void
message object
return void
Example #1
0
        private static byte ToASCII(char character)
        {
            byte value = 0;

            try
            {
                value = Convert.ToByte(character);
            }
            catch (OverflowException)
            {
                RailDebug.LogMessage("Cannot convert to simple ASCII: " + character);
                return(0);
            }

            if (value > 127)
            {
                RailDebug.LogMessage("Cannot convert to simple ASCII: " + character);
                return(0);
            }

            return(value);
        }