+ 2

Can anyone help me with how pointers can be used in c#

I have to import a delphi code which specifies string of char array and i want to access the size of the string, which will not be equal to '. Length' property, hence pointers will be needed. Can anyone help with this!?

21st Jul 2017, 4:16 PM
Catherine
2 Respostas
+ 2
Pointers: https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/unsafe-code-pointers/pointer-types You can also use the "ref" or "out" keywords for references. You could also create your own object, similar to a string. Only now the .length() would be whatever you want it to be instead of the amount of characters in the array. (No pointers required). Could call it size(), encase you still want to use length().
21st Jul 2017, 4:23 PM
Rrestoring faith
Rrestoring faith - avatar
+ 1
Thanku so much i will try this. @Rrestoring faith 👍
21st Jul 2017, 4:33 PM
Catherine