I have a windows form application in c#, that uses a function in c++. This was done using a c++ wrapper. However, the function requires the use of pointers and c# does not allow the use of pointers with string arrays. What can be done to overcome this? I have read up on using marshal but i am not sure if this is suitable for this case and if so how should it be integrated with my code. The following is the C# code:
`
int elements = 10;
string [] sentence = new string[elements];
unsafe
{
fixed (string* psentence = &sentence[0])
{
CWrap.CWrap_Class1 contCp = new CWrap.CWrap_Class1(psentence, elements);
contCp.getsum();
}
}
`