<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>String.Split and and some more robust behavior [Kit George]</title><link>http://blogs.msdn.com/bclteam/archive/2005/02/14/372636.aspx</link><description>We get a lot of people pointing out a fundamental design issue with String.Split: when you do your split, it actually splits at every item found, even if the items are contiguous. Now this actually is useful for some scenarios. For example, imagine you</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: String.Split and and some more robust behavior [Kit George]</title><link>http://blogs.msdn.com/bclteam/archive/2005/02/14/372636.aspx#372650</link><pubDate>Tue, 15 Feb 2005 02:10:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:372650</guid><dc:creator>AndrewSeven</dc:creator><description>Nice,&lt;br&gt;&lt;br&gt;I'm glad to see splitting on strings.&lt;br&gt;&lt;br&gt;I was wondering how the overloads would change to keep the usage unambiguous.&lt;br&gt;&lt;br&gt;I had a look at the doc and I'm curious why String.Split (String[], Boolean) is there as obsolete. Changes from ealier V2.0 I guess.</description></item><item><title>re: String.Split and and some more robust behavior [Kit George]</title><link>http://blogs.msdn.com/bclteam/archive/2005/02/14/372636.aspx#372653</link><pubDate>Tue, 15 Feb 2005 02:13:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:372653</guid><dc:creator>Kit George [Msft]</dc:creator><description>The calls are typed differently so there should be no ambiguity issues. And yup, the bool was how we decided to do this in an earlier iteration of V2.0, but due to design guideline changes (which indicate that people far prefer named values when the boolean values of 'true' and 'false' are impossible to interpret. It makes the code easier to read), which indicated we should use an enum instead.</description></item><item><title>re: String.Split and and some more robust behavior [Kit George]</title><link>http://blogs.msdn.com/bclteam/archive/2005/02/14/372636.aspx#372946</link><pubDate>Tue, 15 Feb 2005 16:30:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:372946</guid><dc:creator>Steve Tibbett</dc:creator><description>Is there a simple way of parsing out csv with Whidbey?  String.Split doesn't work since some strings may be quoted.. &lt;br&gt;&lt;br&gt;Or is there a way of handling that now?&lt;br&gt;</description></item><item><title>re: String.Split and and some more robust behavior [Kit George]</title><link>http://blogs.msdn.com/bclteam/archive/2005/02/14/372636.aspx#373932</link><pubDate>Wed, 16 Feb 2005 05:41:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:373932</guid><dc:creator>Kit George [Msft]</dc:creator><description>Steve, the short answer is no, but we do have a feature request for that for Orcas.</description></item><item><title>re: String.Split and and some more robust behavior [Kit George]</title><link>http://blogs.msdn.com/bclteam/archive/2005/02/14/372636.aspx#375605</link><pubDate>Fri, 18 Feb 2005 00:43:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:375605</guid><dc:creator>Jared Tullis</dc:creator><description>Is that feature request in the feedback center so we devs can vote on it?  I wholeheartedly second it.  I also agree with the readability afforded with the enum vs. bool, this way you can in the future include StringSplitOptions.ParseAsQuoted :)</description></item><item><title>Why I love the .NET Framework.</title><link>http://blogs.msdn.com/bclteam/archive/2005/02/14/372636.aspx#376471</link><pubDate>Sat, 19 Feb 2005 08:30:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:376471</guid><dc:creator>notgartner.com: Mitch Denny's Blog</dc:creator><description /></item><item><title>re: String.Split and and some more robust behavior [Kit George]</title><link>http://blogs.msdn.com/bclteam/archive/2005/02/14/372636.aspx#376860</link><pubDate>Sun, 20 Feb 2005 10:54:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:376860</guid><dc:creator>jaybaz [MS]</dc:creator><description>Kit,&lt;br&gt;&lt;br&gt;Why not make it &amp;quot;String.SplitOptions&amp;quot; - make the enum a type nested in String?  For the price of only a single character, you avoid poluting the System namespace.</description></item><item><title>re: String.Split and and some more robust behavior [Kit George]</title><link>http://blogs.msdn.com/bclteam/archive/2005/02/14/372636.aspx#376877</link><pubDate>Sun, 20 Feb 2005 11:46:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:376877</guid><dc:creator>Kit George [msft]</dc:creator><description>Jared: you're right on the money with regards to being able to expand the option in the future, for exactly the kind of behavior you describe. But the primary reason is readability.&lt;br&gt;&lt;br&gt;JayBaz: We tend to avoid nested types when it comes down to actually using them. It tends to be more confusing than it is beneficial. We do however, completely agree with trying to prevent adding an ongoing number of things to the System namespace, and we'll be locking down on that moving forward.</description></item></channel></rss>