using Towel.DataStructures;
static void Main(string[] args)
Console.WriteLine("You are runnning the Extensions example.");
Console.WriteLine("==========================================");
Console.WriteLine(" Converting Decimal To Words---------------------------");
decimal value1 = 12345.6789m;
Console.WriteLine(" Value1 = " + value1);
Console.WriteLine(" Value1 To Words = " + value1.ToEnglishWords());
decimal value2 = 999.888m;
Console.WriteLine(" Value2 = " + value2);
Console.WriteLine(" Value2 To Words = " + value2.ToEnglishWords());
decimal value3 = 1111111.2m;
Console.WriteLine(" Value3 = " + value3);
Console.WriteLine(" Value3 To Words = " + value3.ToEnglishWords());
#region Type To C# Source Code
Console.WriteLine(" Type To C# Source Code---------------------------");
Console.WriteLine(" Note: this can be useful for runtime compilation from strings");
Console.WriteLine(" " + typeof(IOmnitreePoints<Vector<double>, double, double, double>).ConvertToCsharpSource());
Console.WriteLine(" " + typeof(Symbolics.Add).ConvertToCsharpSource());
#region Random Extensions
Console.WriteLine(" Random Extensions---------------------------");
Console.WriteLine(" Note: there are overloads of these methods");
Random random = new Random();
Console.WriteLine(" Random.NextLong(): " + random.NextLong());
Console.WriteLine(" Random.NextDateTime(): " + random.NextDateTime());
Console.WriteLine(" Random.NextAlphaNumericString(15): " + random.NextAlphaNumericString(15));
Console.WriteLine(" Random.NextChar('a', 'z'): " + random.NextChar('a', 'z'));
Console.WriteLine(" Random.NextDecimal(): " + random.NextDecimal());
Console.WriteLine(" Random.NextTimeSpan(): " + random.NextTimeSpan());
#region XML Code Documentation Via Reflection
Console.WriteLine(" XML Code Documentation Extensions------------");
Console.WriteLine(" You can access XML on source code via reflection");
Console.WriteLine(" using Towel's extension methods.");
Console.WriteLine(" XML Documentation On Towel.Mathematics.Compute:");
Console.WriteLine(typeof(Compute).GetDocumentation());
Console.WriteLine(" XML Documentation On Towel.Mathematics.Constant<float>.Pi:");
Console.WriteLine(typeof(Constant<float>).GetField(nameof(Constant<float>.Pi)).GetDocumentation());
Console.WriteLine("=================================================");
Console.WriteLine("Example Complete...");