My Code are as follows:
public static unsafe bool ExistInURL(params object[] ob)
{
void* voidPtr = (void*) stackalloc byte[5];//Invalid expression term
*((int*) voidPtr) = 0;
while (*(((int*) voidPtr)) < ob.Length)
{
if ((ob[*((int*) voidPtr)] == null) || (ob[*((int*) voidPtr)].ToString().Trim() == ""))
{
*((sbyte*) (voidPtr + 4)) = 0;//Cannot apply operator '+' to operand of type 'void*' and 'int'
goto Label_004B;
}
*(((int*) voidPtr))++;//The left-hand side of an assignment must be a varibale,property or indexer
}
*((sbyte*) (voidPtr + 4)) = 1;
Label_004B:
return *(((bool*) (voidPtr + 4)));//Cannot apply operator '+' to operand of type 'void*' and 'int'
}
The problem is when i'm trying to build or run the project i get a lot of errors. Anyone have any ideas?