Welcome to MSDN Blogs Sign in | Join | Help

Browse by Tags

All Tags » c#   (RSS)

NicolTIP#006: how to show previous and next item using LINQ

I had a table on SQL 2005 I am accessing it via LINQ. I had to select an item via a “where” condition (see below). var item = (from snap in adc.Snapshots       where snap.file == image       select snap).First();
Posted by NicolD | 0 Comments
Filed under: ,

Update WinForm interface from a different thread

Well, this is a typical issue when you have a thread that works (i.e. a Workflow) and a UI that needs to be updated. Let assume that you have a WinFom and you need to update its windows Title from another thread. The other thread needs to call "UpdateTitle"
Posted by NicolD | 0 Comments
Filed under: , ,

Avoid threads deadlock

On this month's issue of MSDN Magazine, Stephen Toub describe the class DdMonitor. DdMonitor implements almost all interfaces exposed by .NET System.Threading.Monitor class but includes deadlock detection capabilities too. With the objective to make available
Posted by NicolD | 0 Comments
Filed under: , ,

How to digitally sign a string

The first step is to create a pair of key(pulic/private): RSACryptoServiceProvider RSA = new RSACryptoServiceProvider(); string publicKey = RSA.ToXmlString(false); string privateKey = RSA.ToXmlString(true); Private key is required to sign the string.
Posted by NicolD | 1 Comments
Filed under: ,
 
Page view tracker