Taking advantage of language features can make sleeker, easier to maintain code. One of these language features are array initializers.
Have you ever created an array, then assigned each element in the array? This incurs many lines of code with no tangible benefit. Check out this code from the NameMangler class in LINQ to XSD. char[] splitters = newchar[4];
splitters[0]='/';
splitters[1]='.';
splitters[2]=':';
splitters[3]='-';
string[] pieces = xsdNamespace.Split(splitters);
Th...
No comments yet, be the first one to post comment.