Paul Gielens:ThoughtsService

another Endpoint to my thoughts

News

Syndication

Ads


Favorites

Projects

November 2004 - Posts

*Update, Dutch .NET Developers Alliance

One of my colleagues Peter Groenewegen has been added to the list. Check out his recipe for Sajoer Boerenkool, great for a team building meal ;) Peter also writes about the C# safe cast construction. Peter forgot the "is" variant. Which of the following options do you prefer? I choose #3 because it's execution is faster then option #1 and more explicit then option #2.

public class ReferenceTypeCastingDemo

{

       private class ACoolObject {}

 

 

       private class AnotherCoolObject {}

 

 

       public static void Main()

       {            

              ACoolObject instance = new ACoolObject();

              object cool = instance; // If only we had #pragma warning disable

              object anotherCool;

 

              // #1

              try

              {            

                     anotherCool = (AnotherCoolObject)cool;

              }

              catch (InvalidCastException ex)

              {

                     Console.WriteLine("Cool object blew in your face.");

              }

 

 

              // #2

              anotherCool = cool as AnotherCoolObject;

 

              if (anotherCool == null)

                     Console.WriteLine("Cool object blew in your face.");

 

      

              // #3

              anotherCool = cool;

 

              if (anotherCool is AnotherCoolObject)

                     Console.WriteLine("Some more cool code goes here...");

              else

                     Console.WriteLine("Cool object blew in your face.");

 

       }

}

Grab the OPML file here which contains allot of Dutch .Net developers. Are you a Dutch .Net developer and want your name on our list, drop a line pgielens@gmail.com

Posted: Nov 29 2004, 10:54 PM by p.gielens | with 5 comment(s)
Filed under:
LOP?

It’s been a while, sorry for that.

Dennis Mulder will give a talk on the Enterprise Library next Thursday. Should be pretty interesting (especially the configuration side), so I hope to see you there.

Ever heard of Language Oriented Programming? Personally I’m more into MDA and raising the bar using Neo’s code generators (which are based on NVelocity). The article does present some interesting thoughts on some of the technologies we use on a daily basis. Speaking of Neo… the start for a manual has been made available on the website. In case you haven’t, then be sure to read my overview on finding Domain Objects with Neo.

Posted: Nov 22 2004, 10:16 PM by p.gielens
Filed under: ,
New job

This week I’ve joined Capgemini, worlds foremost provider of Consulting, Technology and Outsourcing services. Due to our unique way of working with our clients called The Collaborative Business Experience I find myself, on my second day, onsite, working on a innovative project.

More Posts