how to convert string into numbers in C#

i would like to now if there is a way to convert this code

GetComponent(GUIText).text = parseInt(Time.time).ToString();

USING C#

Do this right.?

GetComponent<GUIText>().text=int.Parse(Time.time.ToString());

Just do this.

GetComponent(GUIText).text = Time.time.ToString();

hiii

i fiiiiiiind

fiiiiind

:smiley:

Time.time is double

code C# is :

using UnityEngine;
using System.Collections;

public class Timer : MonoBehaviour {
	//float startTimer=Time.time;
	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
		double a=Time.time;
	    int b;
		b= (int)a;
		GetComponent<GUIText>().text=b.ToString ();
	
	}
}