Ver Mensaje Individual
  #2 (permalink)  
Antiguo 06/05/2011, 12:45
Avatar de giovani_loera
giovani_loera
 
Fecha de Ingreso: mayo-2011
Ubicación: Tijuana
Mensajes: 225
Antigüedad: 13 años
Puntos: 21
Respuesta: Como convertir de char a string

Creo que ay otro forma mas rapida y sencilla, solo tienes q convertir el string en INT, si tiene el 0 al principio lo eliminara. Te pondre un codigo, espero q t sirva.

string hourOld="03";
int hour=Convert.ToInt32(hourOld);
string hourNew=hours.ToString();
***** houNew="3" ***

string hourOld="15";
int hour=Convert.ToInt32(hourOld);
string hourNew=hours.ToString();
***** hourNew="15" ***