Posts Tagged "C#"

Using Performance Counters in the C# Language

At any given time the Windows operating system is tracking statistics for the system and many of the processes / applications that are currently running on it. Things like the number of processors, how many threads are executing, how often the CLR is in garbage collection, the number of I/O operations being performed etc are all tracked through things called performance counters. One way you can look at these various ...

Can Tools Make Coding Too Easy?

I caught a wonderful article on Dzone today by Jonas Gauffin titled "How Resharper rocks my average work day". In this article Jonas talks about a tool he uses regularly called "Resharper" that makes common tasks a bit more automated when coding in C#. This article reminded me that we are continuously developing better and better tools that help us write code. But is there a point where we are ...

5 Quick and Easy Refactoring Tips

You wouldn't believe how many programming questions I run across, on a daily basis, asking for help with programs that contain repetition, duplication and enough spaghetti code to feed half of Italy. Often times the person asking the question has a particular problem but they don't know exactly where the problem originates. So they plop down a bunch of code and say "It is somewhere in there... I think". Usually ...

Rijndael Class Example for File Encryption in C#

Hello readers! It has been awhile since my last post. Lots of things have been going on lately and I have been busy developing some great code for some great people. In this entry I am going to show you a bit of plain text file encryption using the Rijndael Algorithm. This example is a fairly simple one and I hope to explain the basics as I move through an ...

Passing Data Between Forms in C# or VB.NET

One of the first obstacles that people new to C# (or VB.NET for that matter) run into is how to get two forms to communicate with one another. How do you get your main form (a parent) to open and pass along data to another form (the child)? This question typically arises when the programmer wants to create a dialog situation where they click a button to launch a dialog ...

Bit.ly Class for shortening URLs in VB.NET and C#

So I was tinkering around with some code and thought "Hey, wouldn't it be great to create a class that could be used to tie into bit.ly's API for shortening URLs?" After having this thought I also thought "I am hungry" so went to get some lunch. Then when I came back, I got to work putting together a quick class that a programmer could use in their projects for ...