Geeks With Blogs
Dave Chestnutt: SparklingCode and CodeGaffes Writing better code; for fun and profit April 2006 Entries
CodeGaffe: Avoid .NET “partial” classes in C# and VB
Microsoft added a new keyword to C# and VB for 2005 (CLR 2.0): partial Don't use it. partial is used to physically break up a class definition into multiple files. When the compiler sees the keyword partial it finds all the related partial files in order to compile the class. This makes it possible to split the code for a single class across multiple files. By and large, though, this is a bad idea. Let’s look at why that is. If you find yourself typing"p-a-r-t-i-a-l" Stop! Reasons Given To Use the ......

Posted On Wednesday, April 5, 2006 6:34 PM

Copyright © Dave Chestnutt | Powered by: