Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.IO;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ConsoleApplication15
- {
- class Program
- {
- static void Main(string[] args)
- {
- using (StreamReader sr = new StreamReader("D:\\New.txt"))
- {
- string str = sr.ReadLine();
- string strResult = null;
- foreach (char a in str)
- {
- if (char.IsDigit(a))
- strResult += a;
- }
- }
- using (StreamWriter sw = new StreamWriter("D:\\New.txt"))
- {
- sw.WriteLine();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement