C#类型转换

C#将string类型隐式转换为int类型:
            clock.Minute = Convert.ToInt32(minute.Text);
            clock.Second = Convert.ToInt32(second.Text);

将Int类型隐式转换为string类型:
            min.Text = clock.Minute.ToString();
            sec.Text = clock.Second.ToString();


 
  

你可能感兴趣的:(C#类型转换)