Prepend one value to a list 'x' number of times I want to add a value multiple times at the beginning of a list, what I have is...

internal static class Helper
{
  public static void Prepend(this IList&lt;double&gt; source, double value, int count)
  {
    for (var i = 0; i &lt; count; ++i)
    {
      source.Insert( 0, value );
    }
  }
}


Then use it as follow

// create
var mylist = new List(){ ... };  // create the list
mylist.Prepend( 0, 10 );  // prepend 0 to the list


But I wonder if there isn't a more efficient way of doing the same thing?
Is there a reason you use IList? because List has the InsertRange method which uses Array.Copy amongst other optimizations.

If we need to support IList,  we don't want to depend upon implementation details and IList.Insert sounds like your best option.

Another approach is you could check whether the actual implementation is List and use the InsertRange method or fallback to Insert in a loop.

Example of adding the items using InsertRange

var items = Enumerable.Repeat(0, 10);
source.InsertRange(0, items);