Is it possible to place code blocks in Microsoft OneNote?

Is it possible to place code blocks such as:

if (x == 2) 
{
  Debug.WriteLine("x equals 2");
}

In Microsoft OneNote? I haven’t discovered a way yet and don’t know why this wouldn’t exist if it doesn’t.