AppDev: Something You Should Know by Irena Kennedy
Everything that is related to application development, and other cool stuff...
SYSK 125: Custom Controls in ToolBox
Have you ever wondered how is it that your custom controls automatically show up in the toolbox...
Author: irenake Date: 05/12/2006
SYSK 124: IDENT_CURRENT Without an Identity Column
SQL Server’s function IDENT_CURRENT(‘tablename’) returns the last identity value set on a specified...
Author: irenake Date: 05/11/2006
SYSK 123: Expand Your Horizon – Learn About How BitTorrent Works
BitTorrent is a populare peer-to-peer download method, which enables fast downloading of large files...
Author: irenake Date: 05/10/2006
SYSK 122: Clone a WinForms Control with all its Properties
As you know, WinForms controls (e.g. TextBox, ComboBox, etc.) are not serializable. So, how do you...
Author: irenake Date: 05/09/2006
SYSK 121: When it’s Not Only Acceptable, but Recommended to Check into Source Control Your .user File
Developer’s personal settings and preferences are stored in a .user file. This is why it’s not...
Author: irenake Date: 05/08/2006
SYSK 120: When == is not same as Equals
What do you think will be the output in the code snippet below? object o1 = 5; object o2 = 5;...
Author: irenake Date: 05/05/2006
SYSK 119: Granular Role Based Security via an Attribute
Most applications implement role based security to assure that only authorized users have access to...
Author: irenake Date: 05/04/2006
SYSK 118: ReadOnly or ContentEditable?
Consider this: you want a text box on a web page to be not editable by the user, but you want to be...
Author: irenake Date: 05/03/2006
SYSK 117: Are You Using Eval or Bind for your ASPX Data Binding?
Many ASP.NET 1.0 and 1.1 developers have been using DataBinder.Eval method to evaluate binding...
Author: irenake Date: 05/02/2006
SYSK 116: Which Code is Faster and Why – Using ‘As’ or ‘Is’ + cast?
Which code segment below is faster? #1 MyClass classInstance = new MyClass(); IDoWork iDoWorkClass =...
Author: irenake Date: 05/01/2006
SYSK 115: Do You Know When and How to Use TypeForwardedTo Attribute?
Do you remember the old TreatAs registry setting for COM classes? If you want a quick refresher,...
Author: irenake Date: 04/28/2006
SYSK 114: String Interning
What do you think is the value of variable result in the code below: string x = "some string here";...
Author: irenake Date: 04/27/2006
SYSK 113: System.Convert.ChangeType Undercover
Are you curious about how ChangeType is implemented, and whether it is different from a cast? Then...
Author: irenake Date: 04/26/2006
SYSK 112: How to Invoke a Method on the Parent Web Form From a Control
The other day I was asked the question above, and since others might benefit from seeing the answer,...
Author: irenake Date: 04/25/2006
SYSK 111: RoundUp and RoundDown in .NET with Decimal Digits
Excel has two very important functions – CEILING and FLOOR that take in two parameters – number and...
Author: irenake Date: 04/24/2006
SYSK 110: Two-Key Dictionary Class
The other day I needed to have a dictionary (i.e. fast search by key) class that works on two keys....
Author: irenake Date: 04/21/2006
SYSK 109: Is it possible to change the ForeColor of a SubItem in a ListView?
The other day I came across the question above at...
Author: irenake Date: 04/20/2006
SYSK 108: What is XPS?
XPS stands for XML Paper Specification – a specification is designed to provide users with a...
Author: irenake Date: 04/19/2006
SYSK 107: The Difference Between Decimal.ToString(“C”) and Decimal.ToString(“C2”)
Formatting string “C2” explicitly tells to leave two decimals. One could also use “C0” (no...
Author: irenake Date: 04/18/2006
SYSK 106: The Cost of Using WindowsPrincipal
Did you know that using WindowsPrincipal.IsInRole is ~40+% slower than doing the same work yourself?...
Author: irenake Date: 04/17/2006
SYSK 105: Switching Between Running ASP.NET Project Under IIS and Personal Web Server
As you know, in VS 2005 you can choose “File System” location option when creating an ASP.NET...
Author: irenake Date: 04/14/2006
SYSK 104: Great Tool for ASP.NET developers
Would you like to view items stored in cache, and remove them for testing purposes? How about being...
Author: irenake Date: 04/13/2006
SYSK 103: WriteFile or TransmitFile?
Both, HttpResponse.WriteFile and HttpResponse.TransmitFile (new in 2.0) write the contents of a file...
Author: irenake Date: 04/12/2006
SYSK 102: Unexpected Behavior in Generics
Consider the following: static public class MyClass { static public void Method<T>(T x) { . ....
Author: irenake Date: 04/11/2006
SYSK 101: How to Release Build an ASP.NET application
You may have noticed that there is no release build option for web apps. That’s because all...
Author: irenake Date: 04/10/2006
SYSK 100: Can You Define What Is Web 2.0?
If not, there is a very good explanation at http://en.wikipedia.org/wiki/Web_2.0. Here are some main...
Author: irenake Date: 04/07/2006
SYSK 99: Is [MTAThread] the Only Solution?
By default, Windows apps (WinForms) are marked with STAThread attribute (see Program.cs). So, if you...
Author: irenake Date: 04/06/2006
SYSK 98: Digging Deeper Into GetHashCode
So, you think you understand when, how and why to override GetHashCode? Then you should be able to...
Author: irenake Date: 04/05/2006
SYSK 97: The Power of Environmental Variables
Did you know that if you type %appdata% in Windows Explorer’s address bar, and press Enter, it’ll...
Author: irenake Date: 04/04/2006
SYSK 96: Macros to Expand and Collapse Regions in VS.NET
Unquestionably, regions make code much cleaner! But they also led to an explosion of method sizes...
Author: irenake Date: 04/03/2006
SYSK 95: Expand Your Horizon – Learn About NUMA
NUMA stands for Non-Uniform Memory Access or Non-Uniform Memory Architecture. NUMA is a computer...
Author: irenake Date: 03/31/2006
SYSK 94: as, is, where keywords in C#
There are a few keywords one should be aware of: The as operator is similar to a cast but on any...
Author: irenake Date: 03/30/2006
SYSK 93: SQL 2005 – How to Script Database One Object per File
In SQL 2000, there was a feature many of us loved and used heavily – ability to script all database...
Author: irenake Date: 03/29/2006
SYSK 92: How to Clear or Remove Certain Items from “Recent Projects” List in Visual Studio
If you create or view a lot of sample projects or demos, you’d love this. While there is no GUI for...
Author: irenake Date: 03/28/2006
SYSK 91: Cool Trick -- Move an Entire Paragraph with a Key Stroke
The other day, I accidentally discovered an easy way to move a line (or number of selected lines) up...
Author: irenake Date: 03/27/2006
SYSK 90: SQL: What Is a Hash Join and When Should You Use It?
Did you know that hash join is most efficient when one of the tables is significantly different in...
Author: irenake Date: 03/24/2006
SYSK 89: Hashing Explained...
So, you hear all the time – Hashtable, hash value, etc. You’ve seen GetHashCode method in Object...
Author: irenake Date: 03/23/2006
SYSK 88: How to Avoid Hardcoding Stored Procedure Names
Say you want to return the name of the stored procedure where an error occurred… How can you do that...
Author: irenake Date: 03/22/2006
SYSK 87: A Better MaskedTextBox For Currency Fields
You may want to save this one off and put it in your personal toolbox… The MaskedTextBox that comes...
Author: irenake Date: 03/21/2006
SYSK 86: .NET Reflector Revisited
In SYSK 7, I discussed a tool created by Lutz Roder that can be used to decompile and analyze .NET...
Author: irenake Date: 03/20/2006
SYSK 85: What are the key features of TFS (Team Foundation Server)?
As was announced yesterday by Rick LaPlante, the Team Foundation Server has been released to...
Author: irenake Date: 03/17/2006
SYSK 84: Where Do GAC Assemblies Live?
Ever wondered where shared assemblies actually are stored, and how “side-by-side” is made possible?...
Author: irenake Date: 03/16/2006
SYSK 83: On the Importance of Calling TrimToSize
Like StringBuilder (see SYSK 16), ArrayList, Queue and SortedList double the buffer when the...
Author: irenake Date: 03/15/2006
SYSK 82: Compression Example in .NET
As many of you may know, .NET framework 2.0 contains a built in support for compressing the file or...
Author: irenake Date: 03/14/2006
SYSK 81: How compression works
In essence, file-compression programs simply get rid of the redundancy. Instead of listing a piece...
Author: irenake Date: 03/13/2006
SYSK 80: Keyboard Shortcuts to Comment/Uncomment Code in SQL Server Management Studio and in Visual Studio 2005
If you’re a keyboard person, try this combination to comment out selected lines (works in both, SQL...
Author: irenake Date: 03/10/2006
SYSK 79: Good SQL Interview Question -- What is the Left Anti Semi Join?
The left anti semi join is a logical operator (read: you’ll see it referred to in the execution...
Author: irenake Date: 03/09/2006
SYSK 78: Avoiding Infinite Loops Due to Error Handling Retries
Ok, so you want to do error handling, not just error logging… So, you catch exception, examine it’s...
Author: irenake Date: 03/08/2006
SYSK 77: The Difference Between Microsoft.Security.Application.AntiXSSLibrary.HtmlEncode and System.Web.HttpUtility.HtmlEncode
As many of you may know, on Feb. 26 Microsoft has released Microsoft Application Security Anti-Cross...
Author: irenake Date: 03/07/2006
SYSK 76: When Should You Call AddMemoryPressure?
If memory consumption happens in the unmanaged code called by your managed code, GC has no way of...
Author: irenake Date: 03/06/2006