Example: Depreciation - French Accounting System

In this example, the depreciation for the second accounting period is calculated for an asset.
using System;
using Imsl.Finance;

public class amorlincEx1
{
    public static void  Main(String[] args)
    {
        double cost = 2400.0;
        DateTime issue = DateTime.Parse("11/1/92");
        DateTime firstPeriod = DateTime.Parse("11/30/93");
        double salvage = 300.0;
        int period = 2;
        double rate = .15;
        DayCountBasis dcb = DayCountBasis.BasisNASD;
        double amorlinc = Bond.Amorlinc(cost, issue, firstPeriod, 
                                        salvage, period, rate, dcb);
        Console.Out.WriteLine("The depreciation for the second accounting "
                               + "period is " + amorlinc);
    }
}

Output

The depreciation for the second accounting period is 360

Link to C# source.