Is my error handling feasible when dealing items not found in an array? internal void ShiftSwapInstrument(SwapCurve shiftedCurve, string swapToShift)
 {
    if (SwapExists(shiftedCurve, swapToShift))
    {
       var rateToShift = shiftedCurve.Swaps.Single(r =&gt; r.Description() == swapToShift);
       rateToShift.Rate = rateToShift.Rate + 1 / 10000.0;
       return;
    }
    throw new PdhSwapRateNotFoundException(swapToShift);
 }

 private bool SwapExists(SwapCurve shiftedCurve, string swapToShift)
 {
    var swap = Array.Find(shiftedCurve.Swaps, r =&gt; r.Description() == swapToShift);
    return swap == null ? false : true;
 }


The above code is what I've written to handle processing when an item is not found in an array. The exception should 'never' be thrown - it's truly exceptional if it does happen - thus I can use Single without reservation within the if-block.

My question is whether my exception handling is correct/feasible when items are not found in my array and is it correct for me to return; when I do?

Secondary question

I noted the following about Array.Find on MSDN


  Return Value
  
  Type: T The first element that matches the conditions defined by the
  specified predicate, if found; otherwise, the default value for type
  T.


Am I correct in my understanding, that since SwapCurve &amp; Swaps are reference types the default value will be null?
Your error handling looks correct to me as long as your application is catching PdhSwapRateNotFoundException at some point and logging appropriate warning/error to notify user about this.

A slight cosmetic modification to your code could be like:

{
    if (!SwapExists(shiftedCurve, swapToShift))
        throw new PdhSwapRateNotFoundException(swapToShift);

    var rateToShift = shiftedCurve.Swaps.Single(r =&gt; r.Description() == swapToShift);
    rateToShift.Rate = rateToShift.Rate + 1 / 10000.0;
    return; // you don't actually need this.
}


And you're correct default value of reference type is null.

Edit:
I assume shiftedCurve.Swaps will not be null, otherwise Find will throw an exception. And if you think it could be the case then you may want to update your code to check for shiftedCurve.Swaps == null and handle it appropriately.