ErroRemover

CSharp · Console

/Program.cs

using System;
					
public class Program
{
	public static void Main()
	{
		string texto = "123456789";
		
		for(int ContChar = 0 ; ContChar < texto.Length; ContChar++)
		{ 			
			string texto10 = texto.Remove(ContChar, texto.Length - ContChar);
			
			int number;

            bool result = Int32.TryParse(texto10, out number);	
			Console.WriteLine(result.ToString());
			Console.WriteLine(number.ToString());
			
			//if(texto10.Length == 0)
			//{
			//	int texto1 = Convert.ToInt32(texto.Remove(ContChar, texto.Length - ContChar));
				
			//	Console.WriteLine(texto1.ToString());
			//}
		
		}	
		
	}
}

;