c# - How can I use unsafe code in VB.Net? -



c# - How can I use unsafe code in VB.Net? -

i know vb.net equivalent of next c# code:

unsafe { byte* pstart = (byte*)(void*)writeablebitmap.backbuffer; int nl = writeablebitmap.backbufferstride; (int r = 0; r < 16; r++) { (int g = 0; g < 16; g++) { (int b = 0; b < 16; b++) { int nx = (g % 4) * 16 + b; int ny = r*4 + (int)(g/4); *(pstart + ny*nl + nx*3 + 0) = (byte)(b * 17); *(pstart + ny*nl + nx*3 + 1) = (byte)(g * 17); *(pstart + ny*nl + nx*3 + 2) = (byte)(r * 17); } } } }

looks it's not possible.

from this post

vb.net more restrictive c# in respect. not permit utilize of unsafe code under circumstances.

c# vb.net unsafe

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -