Archive | Articles RSS feed for this section

LightSwitch Tutorial – Building a Basic Application

This tutorial provides a walkthrough of creating a simple LightSwitch application. [LightSwitchTutorial.com]

Read more

C# Security – Using Hashing

Hashing   is a method of one-way encryption which is ideal for storing passwords in a database, as you may never require a decrypted version. To authenticate some data, simply hash what the user input and compare it with the data stored in the database.
A hash code will always be a small fixed size irrespective [...]

Read more

Windows Intune Review

Detailed review of the new Windows Intune administration console [WinServerHelp.com]

Read more

Exchange Server Performance – Mailbox Servers

Guide on how to optimize the performance of Mailbox Servers on Exchange Server. [ExchangeServerExpert.com]

Read more

Using SharePoint Offline with SharePoint Workspace

Detailed tutorial on using SharePoint offline. [SharePointMonitor.com]

Read more

Get the OS, Service Pack, and CLR Version info using C#

You can use the System.Environment.OSVersion class to access detail s of the user’s system environment
The below code demonstrates using the OSVersion object to access environmental info:

OperatingSystem osObj = System.Environment.OSVersion;
Console.WriteLine(“Platform is: {0}”, osObj.Platform);
Console.WriteLine(“Service Pack is: {0}”, osObj.ServicePack);
Console.WriteLine(“Version is: {0}”, osObj.Version);
Console.WriteLine(“VersionString is: {0}”, osObj.VersionString);
Console.WriteLine(“CLR Version is: {0}”, System.Environment.Version);

Note that the OSVersion object will [...]

Read more

Use ReaderWriterLockSlim to Protect Access to Resources in C#

It is normally safe to allow let multiple threads read data at the same time, but when a thread is required to perform a write, all other threads will need to be blocked. The .NET framework originally provided ReaderWriterLock for this circumstance, but it has performance issues which often outweigh its usefulness. [...]

Read more

Protect Data on Multiple Processes using C#

If you have a routine which splits data across processors using the Parallel class you may need to protect memory, files or other resources which are shared across the multiple processes. One solution to this is to use a mutex, which is similar to a Monitor object, but at the operating system level. Mutexes must [...]

Read more

Using the Parallel Class in C# – Run Tasks in Parallel on Multiple Processors or Cores

The Parallel Class can be used to split up the tasks which work on the data. For example if you have iterative code that looks like the below code:
//6 parts of the book
string[] inputTextFiles =
{
“part1.txt”, “part2.txt”, “part3.txt”,
“part4.txt”, “part5.txt”, “part6.txt”
};

foreach (string file in inputTextFiles)

{
string contentStr = File.ReadAllText(file);
CountCharacters(contentStr);
CountWords(contentStr);
}
The Parallel class can be used with lambda expressions [...]

Read more

Using the Parallel Class in C# – Processing Data in Parallel across Multiple Processors or Cores

The new Task Parallel Library introduced with .NET 4, allows you to easily split code execution onto multiple processors without using threads or locks.
For a task which is easily split into independent sub-tasks, or data that can be partitioned and computed separately you can use the Parallel class in System.Threading to assign [...]

Read more