Consider the following code in an unsafe context:
string mySentence = \"Pointers in C#\"; fixed (char* start = mySentence) // this is the line we\'re talkin
This doesn't work because you're trying to access a string. If you change your code to:
char[] mySentence = "Pointers in C#".ToCharArray(); fixed (char* start = &mySentence[0]) { char* p = start; do { Console.Write(*p); } while (*(++p) != '\0'); } Console.ReadLine();
everything will work fine.