JasonBock / SpackleNet

Spackle is a project that contains a number of helper methods I've used to supplement the core classes in .NET.
MIT License
14 stars 1 forks source link

Add a Conversion From `Range` to `Range<int>` #46

Closed JasonBock closed 1 year ago

JasonBock commented 1 year ago

I added this extension method to do this, but I'm thinking that arguably the "right" way to do this is to have an implicit conversion in place. Then I think I could something like this:

DoFunCalculations(0..100);

static void DoFunCalculations(Range<int> range)
{
  // Do stuff with Range...
}
JasonBock commented 1 year ago

Never mind, I can't do this, because the return type has to be the same as the enclosing type, so....oh well.