Sending Mail in .NET Using SmtpClient

The .NET SmtpClient class which is in the System.Net.Mail namespace enables the sending of mail through the ubiquitous Simple Mail Transfer Protocol (SMTP). To send a simple text-based mail, first instantiate an SmtpClient object, set its Host property to your SMTP server address, and finally call Send: SmtpClient clientObj = new SmtpClient(); clientObj.Host = “mail.myisp.net”; […]

Read more

PLINQ Tutorial

PLINQ (Parallel LINQ) is a parallelized version of LINQ to objects which supports all the existing LINQ operators and functionalities plus several additional options for control of the parallelization. This PLINQ turorial runs you thorugh the main concepts and features of PLINQ. The parallelized functionality has been added to LINQ  through the interface <IParallelEnumerable> which […]

Read more

Using the Stopwatch Class in C#

The .NET Stopwatch class provides a easy mechanism for measuring code execution time. The stopwatch object uses the highest-resolution timing mechanism which the OS and hardware provides, which is normally less than a microsecond. By way of contrast Environment.TickCount and DateTime.Now have a resolution of approximately 15 microseconds. To use the Stopwatch, simply instantiate a […]

Read more

Compression Using DeflateStream and GZipStream

The .NET System.IO.Compression namespace provides two general purpose compressions streams –  DeflateStream and GZipStream. Both these compressions streams use popular compression algorithm which is similar to that used by the ZIP format. The difference is that GZipStream writes an additional protocol at the start and at the end which includes a CRC to detect  errors. The GZipStream also […]

Read more

Programmatically Upload and Download Files using FTP and C#

FTP is still the standard for online downloads and uploads, but to utilize it in .NET you can just use the System.Net.FtpWebRequest class which exposes all the functionality of FTP without having to know how FTP works. Thus, C# can perform FTP uploads and downloads using the System.Net.FtpWebRequest class. FTP Downloading using.NET FtpWebRequest objects are […]

Read more

Asynchronous Programming using C# Async and C# Await

Asynchronous programming used to be handled using threading in C#. If you had a process you wished to run asynchronously then you just opened up a thread, ran the process on it and then closed it down once the process was complete. Threading however introduces its own set of problems, managing the threads can be […]

Read more

PowerShell Tutorial – CmdLets

PowerShell Tutorial – CmdLets

Read more

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 […]

Read more

Windows Intune Review

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

Read more