The asterisk is part of the type C# with Example



The asterisk is part of the type C# with Example

In C and C++, the asterisk in the declaration of a pointer variable is part of the expression being declared. In C#, the 
asterisk in the declaration is part of the type. 
In C, C++ and C#, the following snippet declares an int pointer: 
int* a; 
In C and C++, the following snippet declares an int pointer and an int variable. In C#, it declares two int pointers: 
int* a, b; 
In C and C++, the following snippet declares two int pointers. In C#, it is invalid: 
int *a, *b; 

0 Comment's

Comment Form

Submit Comment