Q:

What is this attribute?

I am pretty confused by the code I have found in some pathfinding example:
[System.Runtime.InteropServices.DllImport("KERNEL32.DLL", EntryPoint="RtlZeroMemory")]
public unsafe static extern bool ZeroMemory(byte* destination, int length);

What does it mean? Why there are the brackets in the import?

A:

The DllImportAttribute instructs the linker where to find the code for this function. That's how your program knows what to do when you call it.
In this specific case, the attribute indicates that the ZeroMemory method's implementation exists in kernel32.dll, where it is exported as RtlZeroMemory.

