Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- template <T> Shift (T left, int32 right)
- {
- if (typeof (T).Name == "Int32")
- return Convert.ToInt32(left) >> right;
- if (typeof (T).Name == "UInt32")
- return (int) (Convert.ToUInt32(left) >> right);
- return 0;
- }
- /*
- private static int Shift<T>(T left, int right)
- {
- if (typeof (T).Name == "Int32")
- return Convert.ToInt32(left) >> right;
- if (typeof (T).Name == "UInt32")
- return (int) (Convert.ToUInt32(left) >> right);
- return 0;
- }
- */
- void WriteBits<T>(T valz, int32 numBits);
Advertisement
Add Comment
Please, Sign In to add comment