|
using System;
namespace StockTest
{
public partial class Program
{
public Program()
{
}
//void Run()
//{
// var p = new Portfolio(new[] {
// Tuple.Create("VOD LN", 100, "GBP"),
// Tuple.Create("BP LN", 1000, "GBP"),
// Tuple.Create("BMW GY", 200, "EUR"),
// });
// p.UpdateCurrencyRate("EUR", 1.0);
// p.UpdateCurrencyRate("GBP", 1.3);
// p.UpdateStockPrice("VOD LN", new Price(60.0, 61.0));
// p.UpdateStockPrice("BP LN", new Price(55.1, 55.2));
// p.UpdateStockPrice("BMW GY", new Price(155.1, 155.2));
// if (p.Result.IsReady) {
// Console.WriteLine(p.Result.Value.BuyPrice);
// Console.WriteLine(p.Result.Value.SellPrice);
// } else {
// Console.WriteLine("NOT READY");
// }
//}
static void Main(string[] args)
{
try {
var program = new Program();
program.Run();
} catch (Exception ex) {
Console.WriteLine("ERROR: {0}", ex.Message);
}
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I am a senior software developer with almost 20 years of experience. I have extensive knowledge of C#, C++ and Assembly languages, working mainly on Windows and embedded systems. Outside of work I am interested in a wider variety of technologies, including learning 20 programming languages, developing Linux kernel drivers or advocating Functional Programming recently.