Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

C code to Visual Basic Net

Posted on 2006-11-01
2
192 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

Easy, flexible multimedia distribution & control

Coming soon!  Ideal for large-scale A/V applications, ATEN's VM3200 Modular Matrix Switch is an all-in-one solution that simplifies video wall integration. Easily customize display layouts to see what you want, how you want it in 4k.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
memory mapped I/O query 6 147
memory leak detection 9 93
Line meaning 9 87
Setting nameservers after res_init fails doing res_query 2 108
An Outlet in Cocoa is a persistent reference to a GUI control; it connects a property (a variable) to a control.  For example, it is common to create an Outlet for the text field GUI control and change the text that appears in this field via that Ou…
Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
The goal of this video is to provide viewers with basic examples to understand and use structures in the C programming language.
The goal of this video is to provide viewers with basic examples to understand recursion in the C programming language.

789 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