daily pastebin goal
58%
SHARE
TWEET

Untitled

a guest May 16th, 2018 96 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.             string satz = "hallo till 123 penis 45 blub alpha gamma 999";
  2.  
  3.             string[] wörter = satz.Split(' ');
  4.             // { "hallo", "till", "123", "penis", ... }
  5.  
  6.             double x; // platzhalter
  7.            
  8.             string[] zahlen = wörter.Where(s => Double.TryParse(s, out x)).ToArray();
  9.             // { "123", "45", "999" usw }
  10.  
  11.             // für nicht zahlen einfach vor die kondition ein ! setzen
RAW Paste Data
Pastebin PRO 'MAY MADNESS'!
Get 60% OFF Pastebin PRO accounts!
Top