.net - Initialize sbyte** in C# unsafe context -
how can sbyte** initialized in c# unsafe context?
i need
sbyte** parameters;
to filled 3 strings: "first", "second", "third".
here possible solution using byte**
. should compatible sbyte**
encoding used ascii , has values 127.
unsafe static void main(string[] args) { fixed (byte* arg0 = encoding.ascii.getbytes(args[0]), arg1 = encoding.ascii.getbytes(args[1]), arg2 = encoding.ascii.getbytes(args[2])) { byte*[] arr = { arg0, arg1, arg2 }; fixed (byte** argv = arr) { ... } } }
Comments
Post a Comment