Category: C#

Cross-Platform Conditional Compilation Symbol for Windows Phone

There are times when you want to build an app targeting different platforms in Windows using the conditional compilation with pre-processor directives. Cross-Platform Conditional Compilation Symbol for Windows Phone If you are targeting the Xbox platform, one may use the pre-processor directive XBOX, similarly if you are targeting the Windows Phone platform , you can use the WINDOWS_PHONE pre-processor directive as shown below. #if WINDOWS_PHONE…

Exception from HRESULT: 0x800455BC Error when using SpeechRecognizer in WP8

When using the SpeechRecognizerUI in your windows phone 8 app, there are times when you receive the “Exception from HRESULT: 0x800455BC Error”. The outcome of this error is “When you call the SpeechRecognizerUI’s RecognizeWithUIAsync() method , it displays a dialog for few seconds and then disappears immediately. When you debug the app, you will find the error “Exception from HRESULT: 0x800455BC ” with the stack…

How to Download Web Content synchronously in C# ?

If you need to download the web content synchronously using C# , you can use the WebClient class that is defined in the System.Net namespace. Below is a sample code snippet demonstrating how to download web content synchronously in c#. How to Download Web Content synchronously in C# ? The output file is generally saved in the same folder where the exe exists.