Monday, August 17, 2009

Aliased Types

One of the less used features I’ve come to know and love as I’ve been working my current project which uses NHibernate and CSLA.Net is the ability to Alias an Object utilizing the “using” clause. The following is an example.


This beauty is essentially saying to the compiler to insert Clsa.Server.ObjectFactory everywhere that CslaObjectFactory exists. This is similar to what gets done when you do a typedef in C++. This is invaluable for me because we have a slew of naming collisions in our codebase.


1 comments:

derkin said...

Thank you llama this was helpful