ToString() 개인적인 메소드

private ToString ( int code ) : string
code int
리턴 string
예제 #1
0
 private void ThrowTypeException(Type type, byte header)
 {
     throw new MessageTypeException(
               String.Format(
                   CultureInfo.CurrentCulture,
                   this._source.CanSeek
                                 ? "Cannot convert '{0}' type value from type '{2}'(0x{1:X}) in position {3:#,0}."
                                 : "Cannot convert '{0}' type value from type '{2}'(0x{1:X}) in offset {3:#,0}.",
                   type,
                   header,
                   MessagePackCode.ToString(header),
                   this._offset
                   )
               );
 }
예제 #2
0
        private void ThrowTypeException(Type type, byte header)
        {
            long offsetOrPosition;
            var  isRealOffset = this.GetPreviousPosition(out offsetOrPosition);

            throw new MessageTypeException(
                      String.Format(
                          CultureInfo.CurrentCulture,
                          isRealOffset
                                        ? "Cannot convert '{0}' type value from type '{2}'(0x{1:X}) in position {3:#,0}."
                                        : "Cannot convert '{0}' type value from type '{2}'(0x{1:X}) in offset {3:#,0}.",
                          type,
                          header,
                          MessagePackCode.ToString(header),
                          offsetOrPosition
                          )
                      );
        }