<p>Does C# have built-in support for parsing strings of page numbers?  By page numbers, I mean the format you might enter into a print dialog that's a mixture of comma and dash-delimited.</p>

<p>Something like this:</p>

<pre><code>1,3,5-10,12
</code></pre>

<p>What would be really nice is a solution that gave me back some kind of list of all page numbers represented by the string.  In the above example, getting a list back like this would be nice:</p>

<pre><code>1,3,5,6,7,8,9,10,12
</code></pre>

<p>I just want to avoid rolling my own if there's an easy way to do it.</p>

It doesn't have a built-in way to do this, but it would be trivial to do using String.Split.
Simply split on ',' then you have a series of strings that represent either page numbers or ranges. Iterate over that series and do a String.Split of '-'. If there isn't a result, it's a plain page number, so stick it in your list of pages. If there is a result, take the left and right of the '-' as the bounds and use a simple for loop to add each page number to your final list over that range.
Can't take but 5 minutes to do, then maybe another 10 to add in some sanity checks to throw errors when the user tries to input invalid data (like "1-2-3" or something.)