April 24, 2014
Hot Topics:
RSS RSS feed Download our iPhone app

More articles by Jay Miller

Is There Anybody Out There? Which Ports on Your Computers Are Listening?

Determine which ports on a computer have an application listening.

.NET Tip: Are Your Computers Up and Running? Are You Sure?

Programmatically make sure all your computer systems are at least powered on and available on the network. Easily add this functionality to your applications!

Creating Flexible Constant Fields

Discover how to use constant fields without having to hard code the values into the class.

.NET Tip: Avoiding Boolean Overload

Reduce your boolean logic to keep you program readable.

.NET Tip: Searching for a Needle in a Haystack, or an Entry in an Event Log

Simplify finding the entry you need from an event log.

.NET Tip: It's 2:00 a.m. Do You Know What Your Processes Are Doing?

Monitor the health of the processes running on your system.

.NET Tip: Creating a Read-Only List

Create a List<T> that cannot be modified.

.NET Tip: Using a Nullable Value Type

Discover how to use nullable types when retrieving data from your database.

.NET Tip: Take a Byte out of Strings

Convert a string to an array of bytes and back again.

.NET Tip: Determining the Type of a Character Variable

Is it a number, a letter, punctuation? Use this extension method to determine the type of a character variable.

.NET Tip: Following Table Relationships with LINQ

Use LINQ's from clause to easily traverse the relationships in your database.

.NET Tip: Sort an ArrayList Using a Custom Comparer Class

Provide your own comparison algorithm when sorting by implementing the IComparer interface.

.NET Tip: Writing to the Event Log

Create a class to add Error, Warning, and Information entries in the Windows event log.

.NET Tip: Returning Mulitple Objects from a Single Method Call

Allow a single call to your method to return multiple objects using the ref keyword with parameters.

.NET Tip: Sort Your Objects by Implementing the IComparable Interface

Allow your classes to easily be sorted they way you would like by implementing the IComparable interface.

.NET Tip: String Literals Without Escape Characters

Use @-quoted strings to avoid escape characters in your string literals.

.NET Tip: Basic Data Manipulation with LINQ

Use LINQ to Objects to easily sort and reshape your data.

.NET Tip: Where Is Your Data Coming From?

LINQ can be used for much more than just accessing data stored in your database. Learn how you can use the from clause with other types of data.

.NET Tip: Receive Notification When a File is Updated

Do you need to know when a file or directory has been updated? The FileSystemWatcher class gives you a very easy means to monitor the file system.

.NET Tip: Return File Contents as a String

What do you do when you need to read in an entire file and process it as a string? Here is a simple solution.

.NET Tip: Creating a Thread-Safe Singleton

The singleton pattern can be used in a wide variety of situations. This tip will show you how to create a thread-safe version of a singleton.

.NET Tip: Converting Strings to Enum Values

Learn how to take a string and convert it into an enumeration value.

.NET Tip: Filling Lists with Enums

Most applications developers build have lists or dropdowns that need to be filled with values for the user to select. This tip will show you how to use an enumeration to populate your lists.

.NET Tip: Using Extension Methods

Extension methods allow you to create utility functions and have them appear to be part or your classes or the built-in classes. You'll learn by making a method from an earlier tip available as an extension method.

.NET Tip: Display Public Information for an Assembly

Discover how to display the public information for an assembly. This will allow you to get a complete view of the assemblies you are using or creating.

.NET Tip: Display All Fields and Properties of an Object

Learn how to display all of the fields and properties of any object. By using a little reflection, you can expose the internals of your objects.

.NET Tip: Passing a Variable Number of Arguments to a Method

Have you ever not known how many parameters a method would need to accept? The C# params keyword lets you pass a variable number of arguments to a method.

.NET Tip: Execute Commands From C#

Have you ever needed to execute a system command from your application? You can accomplish this easily with C#.

.NET Tip: New Features in C# 3-Automatic Properties and Initializers

Take a look at a couple of the language enhancements in C# 3 (VS2008) that can speed up your development and make your code cleaner: automatic properties and initializers.

.NET Tip: Converting Strings to Numbers

Converting strings of digits into numeric data types may not always yield the result you expect. Take a look at three ways to convert a string of digits to an integer and learn what you need to watch out for with each method.

.NET Tip: Throwing Custom Exceptions

Use custom exceptions to add information that will be more meaningful to your users when exceptions occur. And, you still can maintain all the information from the original exception.

.NET Tip: Type Casting and Comparison Using "as" and "is"

Use some of the language's lesser known features for safe type casting and comparison.

.NET Tip: Throwing Exceptions: Will You be Able to Catch What You Expect?

Handling exceptions can sometimes be a little tricky. If you are not careful, your code may act on the wrong information. Learn how to bubble up exceptions while keeping the original exception information intact.

.NET Tip: Data Encapsulation: Using Properties Instead of Public Variables

Here is encapsulation, one of the very basic tenets of object-oriented programming. Using properties instead of public variables helps insulate the users of your class from change, provides you more flexibility, and will ease maintenance of your class.

.NET Tip: Debugging: Dynamically Determining the Name of the Current Function

Are you tired of hard-coding function names in trace messages? Have you ever used cut and paste to copy a trace statement and forgot to change the function name? There'll be no more wild goose chases because of bad function names when you determine the function name dynamically.

.NET Tip: Implement IDisposable to Ensure Your Objects Clean Up After Themselves

Be a good resource citizen by implementing IDisposable. You will be able to ensure that your objects have the opportunity to release all of their managed and unmanaged resources.

.NET Tip: Managing Resources with the Using Statement

Take control of the lifetime of your objects. Release your object's resources on your schedule, not when the CLR determines they are no longer needed.

.NET Tip: Restrict the Access to Your Properties!

Stop unwanted changes to your properties! Discover how to you can stop worrying about accidentally changing values, while still allowing multiple views into your classes!

.NET Tip: Take Advantage of Interfaces

Stop writing more code than needed. You can streamline your code if you use interfaces. You will be able to write simpler, more flexible, and more maintainable applications when you apply interfaces.

Sitemap | Contact Us

Rocket Fuel