During c sharp coding, we will use c pointer sometimes.
That's not safe for managed code, like c sharp.
On this, we can use "unsafe and fixed" to resolve the error.
Use System.SecuryString as example:
On SecuryString, one of its constructor is:
SecuryString(char* cha, length)
"*" is get the address. It is sybolic from c, not for c sharp.
It is not save use c code in c sharp environment directly.
So, we will change as below to use this:
public unsafe void functiname()
{
fix(char* pchar= mychararray)
{
securestring mysecurestring = new securestring(pchar, mychararray.length);
}
}