Solved

C code to Visual Basic Net

Posted on 2006-11-01
2
189 Views
Last Modified: 2010-04-15
Hi,

Can anyone give me the VB.Net equivalent of the following C line of code, or explain the C syntax?

Thank you.

kb[6-i][1+j] |= newbit[j*8+k] << (7-k);
0
Comment
Question by:IAJWDDIY
2 Comments
 
LVL 45

Accepted Solution

by:
sunnycoder earned 500 total points
ID: 17848666
Hi IAJWDDIY,

kb is a 2D array ... newbit is a 1D array ...
This code is same as

a = kb[6-i][1+j]; ...... get element in (6-i)th row and (1+j)th column
b = newbit[j*8+k]; ..... get (j*8+k)th element from newbit array
b = b << (7-k); .... Left shift it 7-k times
a = a | b; .... Bitwise OR a with b
kb[6-i][1+j] = a .... store the result back in 2D array at the same location ... (6-i)th row and (1+j)th column

Cheers!
sunnycoder
0
 

Author Comment

by:IAJWDDIY
ID: 17848721
Thanks sunnycoder!
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Have you thought about creating an iPhone application (app), but didn't even know where to get started? Here's how: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Important pre-programming comments: I’ve never tri…
Preface I don't like visual development tools that are supposed to write a program for me. Even if it is Xcode and I can use Interface Builder. Yes, it is a perfect tool and has helped me a lot, mainly, in the beginning, when my programs were small…
The goal of this video is to provide viewers with basic examples to understand and use pointers in the C programming language.
The goal of this video is to provide viewers with basic examples to understand opening and writing to files in the C programming language.

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now