Show the int/float value in GUI.Label

Hi!

I have a float, it changes over time. I want to show/write out the value of this float in a GUI.Label. The float is nanometersinglerun. This is the code:

using UnityEngine;
using System.Collections;

public class NewBehaviourScript : MonoBehaviour {
	public static float nanometersinglerun = 0;
	// Use this for initialization	
	
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
		nanometersinglerun = Time.timeSinceLevelLoad;
	       
	}
	
	void OnGUI () {
	    GUI.Label (new Rect (50, 25, 100, 30), nanometersinglerun);	
	}
	
}

When i try to start, it says:
The best overloaded method match for ‘UnityEngine.GUI.Label(UnityEngine.Rect, string)’ has some invalid argument

and

Argument ‘#2’ cannot convert ‘float’ expression to type ‘string’

Both errors are at (19,17)

When i put the nanometersingletime into ‘’ ‘’, it works, but shows me ‘‘nanometersingletim’’ not the value.

Thanks!

use

GUI.Label (new Rect (50, 25, 100, 30), nanometersinglerun.ToString());    

or

GUI.Label (new Rect (50, 25, 100, 30), string.Format("{0}", nanometersinglerun);