Programme consists of Fibonacci class library: here is determines Fib1 function, which count imported number"s fibonacci. There is determine an indexer for Fibonacci function in clas.
namespace Testfibonaci
{
class Program
{
static void Main(string[] args)
{
fib f = new fib();
Console.WriteLine("f4=" + f[4]);
Console.WriteLine("f5=" + f[5]);
}
}
}
The result in Console window shown in bellow.
f4=3 f5=5