For your purpose, yes you can just modify the returned shipping methods right after the call to cart.GetShippingMethods
The logic for the estimates is located on the shoppingcart.aspx code-behind, available even without source.
One thing to note is that, .net won't allow you to remove items in a collection while looping.
You're on the right track, but you'd need to do something like:
C#/VB.NET Code:
ShoppingCart cart = new ShoppingCart(1, thisCustomer, CartTypeEnum.ShoppingCart, 0, false);
//Collect the available shipping method
ShippingMethodCollection availableShippingMethods = cart.GetShippingMethods(thisCustomer.PrimaryShippingAddress);
// temporary collection that will hold only the valid shipping methods
ShippingMethodCollection temp_validMethods = new ShippingMethodCollection();
foreach (ShippingMethod shipMethod in availableShippingMethods)
{
// filter out shipping methods that starts with "Express"
// and add it to our temp collection
if (shipMethod.Name.StartsWith("Express") == false)
{
temp_validMethods.Add(shipMethod);
}
}
// clear out the original
availableShippingMethods.Clear();
// add the valid ones so as to continue
availableShippingMethods.AddRange(temp_validMethods);
// temporary collection has overlived it's use
temp_validMethods.Clear();
Here for example purposes, i'm filtering out shipping methods that simply starts with the word "Express"