GUIContent constructor does not work inside of GUI.Label

Hi. A question about generall understanding what’s going on: I wanted to use a GUI.Label with a GUIContent just like in the reference:

GUI.Label(someRect, GUIContent(someImage, someString));

However it gave me an exeption concerning best overload match GUI.Label(rect, string) has invalid arguments. Apperently the overload for GUI.Label(rect, GUIContent) was not recogniced. When I constructed the content outside it worked:

GUIContent cont = new GUIContent(someImage, someString);
GUI.Label(someRect, cont);

The reference indicates that the first method should work but it doesn’t. Have I done something wrong? Does this only work in js not in c# (I’m using C#).
Thanks for helping me out of confusion.

You need to use new in C#:

GUI.Label(rect, new GUIContent(x, y) )