microsoft / Intune-Resource-Access

Sample code and scripts for interfacing with the Intune Resource Access APIs.
MIT License
55 stars 59 forks source link

Non-functional changes #7

Closed hg-msft closed 6 years ago

hg-msft commented 6 years ago

Use C# 'using' keyword rather than nested try/finally blocks for IDisposable classes. Be explicit about use of ordinal string comparison. Throw ArgumentNullException when parameter is null. Fix typographical error (missing space) in function summary.

Fix exception message when converting UTF-8 into UCS-2. The error message indicated the UTF-8 encoding is invalid simply because the Unicode code point encoded was greater than 0xFFFF. As an example, UTF-8 supports 4-byte character encodings for characters such as U+1F355 (🍕, aka "SLICE OF PIZZA"). Therefore, the error message should instead indicate the code point would not fit into USC-2 encoding....