Here’s a simple code snippet to read the serial inputs in C#. I had to use this code several times when working with arduino like devices.
Tag Archives: dotnet
Truly random algorithm in C# – The chaotic user
If you’ve already use System.Random in a fine tuned app you’ve probably notice something strange. You get the same random values across sessions. Why ?
The inline if statement in C# : Surprise !
Hi, I got a strange issue today I posted on stackoverflow. The Issue Here’s the situation, I’ve abstracted the name and logic to focus on the issue. Got 3 types, A, B and C. B & C have implicit operators defined to convert to A object. Then, when I do this, the code compile andContinue reading “The inline if statement in C# : Surprise !”
Automatic Recovery & Restart in .Net application
The goal here is to improve the reliability of a .net client application by managing cases where things goes wrong and the universe of your product fall on himself, for example due to memory corruption, unhandled exception, Stack/Memory/<place your stuff-Overflow and so on. The Issue In the current situation, when you want to know ifContinue reading “Automatic Recovery & Restart in .Net application”
Extract data from HTML page with XPath and Linq
As developer, we usually need to extract data from a html web page in our projects, but most of the time we try to find another solution due to the complexity of the task. Indeed, the classical approach would be to use regex or similar and try to find out our informations in the pageContinue reading “Extract data from HTML page with XPath and Linq”
Very simple plugin mechanism in C#
Once again I had to face the famous content aggregator problem. I already have done that on several project so I decided to write an article on that for the ones who wonders how to accomplish things like that. Background So, the situation is : I have a system, who consume several services, aggregate theContinue reading “Very simple plugin mechanism in C#”
Mono and Firebird : IOControl Not Implemented
This is a repost from a question I asked on stackoverflow.com that I finally manage by myself… The issue I’m actually working on a project where I need to host a .NET webservice on a linux server hosting a firebird database. When I try to run the sample code from http://www.mono-project.com/Firebird_Interbase and call the method,Continue reading “Mono and Firebird : IOControl Not Implemented”
MSMQ : Architecture et principes
Présentation de MSMQ MSMQ, acronyme de Microsoft Message Queuing est une implémentation Microsoft de Message Queue. Une Message Queue est un ensemble de techniques permettant l’échange asynchrone de messages. Par exemple, une boite mail peut être considérée comme un MQS (j’utiliserai par la suite cette abréviation pour parler de manière générique des message queuing system),Continue reading “MSMQ : Architecture et principes”
Visual Studio Code Snippet : Dependency Property et NotifyPropertyChange
UPDATE 1 : Pour des raisons que je ne détaillerai pas ici, certaines snippets ne référençait pas “http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet” comme xmlns. Le code et le zip est màj avec le “bon” xmlns. Voici une série de code snippet que je me propose de partager avec vous. Elles sont souvent simples et certaines peuvent sembler un peuContinue reading “Visual Studio Code Snippet : Dependency Property et NotifyPropertyChange”
WebSocket avec ASP.NET 4.5 et Microsoft.Websockets
Websocket est un standard qui permet de « développer un canal de communication bidirectionnel et full-duplex sur un socket TCP pour les navigateurs et les serveurs web. » C’est que l’on fait actuellement lorsque l’on utilise des XMLHttpRequest avec Ajax. En dotnet SignalR permettait déjà de profiter de ces features, maintenant il est possible de le faireContinue reading “WebSocket avec ASP.NET 4.5 et Microsoft.Websockets”