TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Sam
NA
166
0
C# Logical operation
Dec 23 2011 10:46 AM
Hi,
I have an array
double[] MyArray
(32 bits) and a variable
ushort MyDevice
(16 bits).
I wish to load the
ushort MyDevice
16 bits to the upper 16 bits of the
double[] MyArray
without affecting the lower array bits, but I get casting errors.
(Both work in C++) but not in C# (it's too safe!).
Have tried:
MyArray[1] |= MyDevice << 16;
and
MyArray[1] & 0xFFFF0000 = MyDevice;
I get errors in both cases.
Can anyone advice?
Thanks
Reply
Answers (
7
)
How to make country name in combobox appear in listview
Generate documentation in c#