Hey, heres a VERY BASIC snippit that will display PI place by place for you to toy with, it isn't great though, it treats Math.PI as a string and just cuts out the appropriate digit. If you want a more exact PI than 15 decimal places you'll have too look it up anduse that instead. Hope that helps a bit!
CODE
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace pi
{
class Program
{
static void Main(string[] args)
{
// itterate 15 times
for (Int16 index = 0; index < 16; index++)
{
// display
Console.Write(returnPIDecimalPlace(index));
}
// wait for input
Console.Read();
}
/// <summary>
/// Returns a decimal place of PI
/// </summary>
/// <param name="decimalPlace"></param>
/// <returns></returns>
private static String returnPIDecimalPlace(Int32 decimalPlace)
{
// if place element
if(decimalPlace == 1)
{
// return place
return ".";
}
else
{
// return element
return Math.PI.ToString().Substring(decimalPlace, 1);
}
}
}
}