StringsByteArrayFormatEnum.cs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. using System;
  2. namespace Wayne.Lib
  3. {
  4. /// <summary>
  5. /// The format of a byte[] converted to (and sometimes from) a string.
  6. /// </summary>
  7. public enum StringsByteArrayFormat
  8. {
  9. #region Fields
  10. /// <summary>
  11. /// The bytes symbolizes decimal numbers.
  12. /// The converted string is comma separated.
  13. /// </summary>
  14. Bytes,
  15. /// <summary>
  16. /// The bytes symbolizes hexadecimal numbers.
  17. /// The converted string is comma separated.
  18. /// </summary>
  19. Hex,
  20. /// <summary>
  21. /// The bytes symbolizes hexadecimal numbers.
  22. /// </summary>
  23. CompactHex,
  24. /// <summary>
  25. /// The bytes symbolizes the current code page's ANSI characters.
  26. /// Unreadable characters are shown as hex-values.
  27. /// </summary>
  28. ANSI,
  29. /// <summary>
  30. /// The bytes symbolizes the current code page's ANSI characters.
  31. /// Unreadable characters are replaced with '?' which means that no conversion
  32. /// back from string to array is supported (due to data loss).
  33. /// </summary>
  34. CompactANSI,
  35. /// <summary>
  36. /// Put the bytes into a string using 1252 encoding
  37. /// </summary>
  38. String,
  39. /// <summary>
  40. /// Get raw bytes stuffed into a string back into a byte array
  41. /// </summary>
  42. Raw,
  43. #endregion
  44. }
  45. }