char* pointer from string in C#

Well you could certainly do this:

string str = "my string";

unsafe 
{
    fixed (char* p = str)
    {               
        // do some work
    }
}

where there is an operator (char*) bound to the string object.
However, the output format may not be compatible with the underlying C or other format… this is however quite a good solution to parse the string.
Hope it’s helpful for anybody who reads this post.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)