What is this weird syntax in C # bytes *

Possible duplicate:
DotNet - What is int *?

Hi, I was looking at some source code for the library, and I saw this byte* , what is the star at the end of ?, and not just with the class byte, but also with some variables like

 var1 = *var3 - *var2; 

early

0
source share
3 answers

This is a pointer (in bytes).

+7
source

When * used for a data type, it is a pointer to that type. byte* - pointer to byte.

When used in a variable, it will dereference the pointer. The value of var3 is a pointer, and the value of *var3 is the byte (or any other type) that the pointer points to.

+3
source

I am sure its unsafe code.

0
source

Source: https://habr.com/ru/post/1341658/


All Articles