Example: Depreciation - Variable Declining Balance

The depreciation between the 10th and 15th year of an asset with a life of 15 years, an initial cost of $25000 and a salvage value of $5000 is computed. The variable-declining balance method is used.
using System;
using Imsl.Finance;

public class vdbEx1
{
    public static void  Main(String[] args)
    {
        double cost = 25000;
        double salvage = 5000;
        int life = 15;
        int start = 10;
        int end = 15;
        double factor = 2.0;
        bool no_sl = false;
        
        double vdb = Finance.Vdb(cost, salvage, life, start, end, 
                                 factor, no_sl);
        Console.Out.WriteLine("The depreciation allowance between the " +
                              "10th and 15th year is " + 
                              vdb.ToString("C"));
    }
}

Output

The depreciation allowance between the 10th and 15th year is $976.69

Link to C# source.