Best way to convert IEnumerable to string?

后端 未结 6 2076
自闭症患者
自闭症患者 2020-12-10 00:34

Why isn\'t it possible to use fluent language on string?

For example:

var x = \"asdf1234\";
var y = new string(x.TakeWhile(char.IsLetter         


        
6条回答
  •  情书的邮戳
    2020-12-10 01:09

    How about this to convert IEnumerable to string:

    string.Concat(x.TakeWhile(char.IsLetter));
    

提交回复
热议问题