[Solved] Why isn’t my math right

Introduction Math is a subject that can be difficult to understand and master. It requires a lot of practice and dedication to get it right. Unfortunately, even with all the practice and dedication, sometimes math can still be confusing and mistakes can be made. If you are having trouble understanding why your math isn’t right, … Read more

[Solved] Why isn’t my math right

It is not clear why you expect this code to behave differently. Look at these lines: var ExchangeRate = c.GrabBTCAmount(); var AmountInBTC = (c.USDtoBTC(15000, ExchangeRate)); var AmountAtMarket = (AmountInBTC * ExchangeRate); If I inline USDtoBTC and inline everything to calculate AmountAtMarket the formula would be AmountAtMarket = (15000 / ExchangeRate) * ExchangeRate So you should … Read more

[Solved] Dynamic Compilation NullReferenceException error

The problem was in the class Program Main(){ method = cc.CompileCode(file, “testNamespace”, “Class1”, “webRequest”, true, arguments);} The string classname was not the good one and didn’t pointed to the real document I wanted to compile. The good path was method = cc.CompileCode(file,”testNamespace”, “WebRequest”,”webRequest”, true, arguments);} That’s why the Type type; couldn’t get something instead of … Read more

[Solved] WebRequest not returning HTML

You need CookieCollection to get cookies and set UseCookie to true in HtmlWeb. CookieCollection cookieCollection = null; var web = new HtmlWeb { //AutoDetectEncoding = true, UseCookies = true, CacheOnly = false, PreRequest = request => { if (cookieCollection != null && cookieCollection.Count > 0) request.CookieContainer.Add(cookieCollection); return true; }, PostResponse = (request, response) => { … Read more