Find an element in a list

Recently I worked on one C# project. Got to say it’s hell lot easier to code :-). Found something cool while working on template based List class. Guess that you got a list of employees stored in List, so how will you locate a particular employee by his name or based on certain employee attributes: […]
Continue reading…

 

WMI in .Net

It’s quite easy to work with WMI in .net. Follow these steps to get details of Win32_VideoController. Namespace to use is System.Management. 1. Create a management class object. [sourcecode language=’cpp’]Dim MngClass As New ManagementClass(“Win32_VideoController”)[/sourcecode] 2. Create a management object class collection instance and fill out this collection likewise… [sourcecode language=’vb’]Dim MngObjCollection As ManagementObjectCollection = MngClass.GetInstances […]
Continue reading…

 

netstat in .net

netstat is a cool tool to view all active tcpip/udp connections in our computer along with the names of applications who have opened these ports/connections. So as a demo open up command prompt and type netstat /a netstat /b -> displays exes which are using a particular port/connection netstat /? -> displays helps for this […]
Continue reading…

 

StringBuilder

One of the classes in .Net that I like is the StringBuilder class. So what is it? It’s like the StringBuffer class in java. It’s a mutable string class which does faster operation while concatenation and other string related functions because internally it doesn’t recreate String objects but maintains a big enough buffer to prevent […]
Continue reading…