Coffeehouse Post

Single Post Permalink

View Thread: Reading int from file in C#
  • User profile image

    Could there be a method which takes a stream of characters & optional function which can eg. replace newline or string with space & a delimiter (like space) and when executed it immediately starts yielding new streams (without waiting for the first delimiter to occur) that can be read up to the delimiter (or current position [up to that delimiter specific to the yield] when del. not yet encountered) and if none is encountered, it would just yield the whole original stream (wrapped) with some flag indicating that no delimiters were found?

    I guess if you want performance and simplicity in C# expect to write a bunch of code. And still it won't perform like C++. This whole "C++ reneissance" is a bunch of non-sense, for now. I'm still out for a language that's written and reads more like C# but if I want I can paste in some C++ code and link native libs etc without perf penalty. Is that too much to ask?