"Usage of GetFuncPtr()"

unsafe {
	delegate* unmanaged<char*> getHelloStrFuncPtr;
	NativeMethods.GetFuncPtr(&getHelloStrFuncPtr);
	Console.WriteLine(new String(getHelloStrFuncPtr())); // Writes "Hello" to the console
}


Code snippet taken from "Two Decades of C#: A Reference - C# 9".