I trying to compile this code:
Int64 itag = BitConverter.ToInt64(temp, 0);
itag &= 0xFFFFFFFFFFFFFC00;
However this gives me the following error:
Operator ‘&=’ cannot be applied to operands of type ‘long’ and ‘ulong’
How do I do this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
See http://msdn.microsoft.com/en-en/library/aa664674%28v=vs.71%29.aspx .
You have
but Int64.Max is:
so
longis not big enough andulongis taken as the type of the literal.Now you have on the left side a
Int64, which is signed, and on the right side you haveulong, however, there is not overload of&=which accepts that combination, which leads to the error.