febbraio 2008 Blog Posts

Deleting specific lines in visual studio editor

Sometimes in visual studio editor you want to delete all the lines containing a specified text. This is possible using regular expression. As you may know regular expression in vs editor are a little bit wierd... Suppose you want to delete all the lines containing "System.Net Verbose" from the following source... 1: [3636] [4472] 00000000 : 3C 3F 78 6D 6C 20 76 65-72 73 69 6F 6E 3D 22 31 : <?xml version="1 2: [3636] System.Net Verbose:...

Parameter passing playground

Getting used to how parameter passing works isn't really simple. Especially if you didn't program so often, every now and then you have to check back how things works. If you really want to understand how things work I recommend you CLR via C# by Jeffrey Richter. First thing to remember is the difference between value and reference types. The first lives in the stack(int, short, struct), the second on the heap (string, your class types). 1: class Program 2: { 3: static void Main(string[] args) 4: ...