Why and where is my XmlSerializer failing?

by Dominic Zukiewicz 10. June 2010 14:11
Overview The XmlSerializer is an excellent utility to turn your classes into XML and vice versa very very easily. So long as you aren't using it on dynamically generated types, but are repeatedly on the same types, then the XML serializer is quite performant. However, as great as the XmlSerializer is, I’ve found it a pain to debug. You have 2 choices: Look through the XML and find the invalid field Step through every property in the debugger for your class and find the property that is failing Problem When your XML document gets to the point of having hundreds of elements, this b... [More]

Tags:

.NET 3.5 | Xml

FindControl() recursively using an Extension Method

by brad 26. January 2010 11:15
FindControl() is great if you’re looking for a control one level down, but if you’re making a dynamic control with n levels of child controls it can become a pain… Extension Methods to the rescue! Not only does it find the control your looking for at any level in the page, it also used generics to return the control without needing to cast it. /// <summary>/// Finds the control (Recursively) with an ID matching that given, of the Type requested. /// No need to cast either!/// </summary>/// <typeparam name="T">The type of control to return</typeparam>///... [More]

Tags:

ASP.NET | .NET 3.5 | C#

Is .NET 3.5's CompiledQuery slower than normal LINQ queries? Part 2

by Dominic Zukiewicz 31. March 2008 15:33
Updated: This article is 2 of the 2 posts about this problem (Problem AND Solution) The answer to this is definitely ... NO! When a colleague looked over my example, we shared some ideas about what LINQ is actually doing. It turns out that my LINQ version was working faster because it wasn't actually doing anything! By design, LINQ defers all processing until the data is actually used. Being assigned as it was wasn't enough! var q = from c in db.Customers where c.City == "London" select c; This only prepares the query, but no executi... [More]

Tags:

.NET 3.5

Is .NET 3.5's CompiledQuery slower than normal LINQ queries? Part 1

by Dominic Zukiewicz 24. March 2008 19:10
Updated: This article is 1 of the 2 posts about this problem (Problem AND Solution) Today, I looked into using LINQ and SQL together. I read about the CompiledQuery.Compile() method which can speed up queries because of the caching. So I decided to run the queries one by one and view the performance improvement. Unfortuantely, I witnessed that the Compiled version took over 20 times longer to run than the non-compiled. I will ask my Microsoft contacts to clarify this, but in the meantime, if you know why this is, please let me know. Pre-requisites Visual Studio 2008 Add a... [More]

Tags:

.NET 3.5

Powered by BlogEngine.NET 1.5.0.7
Theme by Interakting

Interakting

A full service digital agency offering online strategy, design and usability, systems integration and online marketing services that deliver real business benefits and ensure your online objectives are met.

Calendar

<<  September 2010  >>
MoTuWeThFrSaSu
303112345
6789101112
13141516171819
20212223242526
27282930123
45678910

View posts in large calendar