byte swapping using System.Net.IPAddress.NetworkToHostOrder


/ Published in: C#
Save to your folder(s)

This shows how to implement simple byte swapping in C#.

It's shown in the context of assert statements instead of print statements to show the expected results.

Interesting post http://bytes.com/topic/c-sharp/answers/506861-littleendian-bigendian compared performance of various methods. mask-shift-or performed best.

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.