Thursday, October 29, 2009


When you create a string with must have multiple line use the option Environment.NewLine and not the escape characters.

Friday, October 23, 2009

Some Anti campaigns

Most programmers use the 'if' and 'loop' statements very much. But when you use this too much, your code can be less readeable. So some blogs have campaigns to minimize the usage of these statements:
- Reduce FOR
- Reduce IF.

Convert VB.NET to C#

Since my new job I have to work a little bit more with VB.NET. So here some tips for converting C# (.NET) and VB.NET and the other way around.

On this site some links can be found, for quick links for converting VB.NET to C# and vice versia.

Further there are some difference between those two languages. Some of these differences can be readen here.

Nested repeater programmatically

On this site I have found some information for creating Nested repeaters programmatically.

Create PDF in ASP.NET

Earlier I have created PDF file from a .NET (web) application with the help of XSL:FO. But my experience was not very good. So I have found a Tutorial for creating PDFs. With this tool you can create PDF files with OO technics, this sounds much better.

Tuesday, October 13, 2009

Tip: Linq to SQL

When you are using Linq to SQL, you have to read (and use) these tips.
I mostly use Linq to Objects, but when I am going to use Linq to Sql is will read these tips again:)

Monday, October 12, 2009

Tool SourceCodeOutliner

I have read something about the SourceCodeOutliner tool. This is a plugin for Visual Studio which organize your class file in a tree. So you can quickly navigate to a field or property.

I am not yet using it. But I think I will give it a try for a couple of weeks.

Sunday, October 11, 2009

.NET Versions

With System.Environment.Version the version of the Common Runtime Language is returned.

In the next switch statement an example of using the Version property:

case "1.0.3705.000" :
Response.Write(" (.NET 1.0)");
case "1.0.3705.209" :
Response.Write(" (.NET 1.0 SP1)");
case "1.0.3705.288" :
Response.Write(" (.NET 1.0 SP2)");
case "1.0.3705.6018" :
Response.Write(" (.NET 1.0 SP3)");
case "1.1.4322.573" :
Response.Write(" (.NET 1.1)");
case "1.1.4322.2032

Overview of .NET versions from the Framework.

Friday, October 9, 2009

Reading attribute with ConfigurationElementCollection

I was programming a part of a configuration file like this

I will use the ConfigurationElementCollection.... so the elements are not very difficult. Create a class for the element with the properties name and url and use this in a class which derived from the ConfigurationElementCollection.

But getting the value of the title attribute on the element is more difficult. I have not yet found a nice way to do does. For now I am use a dirty hack.

Wednesday, October 7, 2009

Google Webelements

With Google Webelements you can create a web element for your web site. On the page you can customize the web element and when you have entered all the settings you simply copy the html in your web site and your web element can be used on your web site.

Design conventions properties and methods

On the blog of Wesley Bakker I have read the following article. Most of this stuff is really basic, but it is always usefull to repeat this. So conform your code to the design conventions for properties and methods, when you do not some other developers which use your code can make wrong assumptions.

Monday, October 5, 2009

XMLSerializer and invalid XML

On the blog of Raj Kaimal I have read the following article about xml serialization.
The conclusion of this article is the existence of the System.Xml.XmlWellFormedWriter class which can be created with the XmlWriter.Create method.