c++ - Char pointer equivalent in c# -


i converting c++ code c#, , char in c++ takes 8 bits while in c# takes 16 bits. don't know char*, so

what equivalent of char * in c#, use byte[] or [marshalas(unmanagedtype.lpstr)] stringbuilder , tell me whether equivalent of char c++ c# byte or string?

for input parameter string or byte[], depending on meaning of parameter. if represents sequence of characters use string. if parameter buffer arbitrary data it's byte[].

however in c/c++ char * can output parameter, such in sprintf function. in case stringbuilder or byte[] equivalent types, depending again on meaning of parameter.

with regards char datatype in c#, please keep in mind char in c# means character, whereras meaning c/c++ closer of byte in c#.


Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

python - cx_oracle unable to find Oracle Client -