NEWBIE, Newbie, newbie question, sorry. I've just started programming in C# (coming long ago from the strongly typed world of c++). Its fun to be back programming but I see in the global.asax file the routes.MapRoute method that takes some kind of untyped object as the third and fourth parameter. Both instantiated the same, but possibly as two different types.
route.MapRoute( p1, p2, new { controller = "Home", Action = "Index" }, new {} );
Surprisingly, everything works well. But, I now want to access the 3rd parameter in a helper and it is coming in as an object type. I don't have any problem with casting the object type to whatever type of object it is, but I don't have a clue what it was instantiated as (nor can I find any docs that say more than object). Along the same line, how on earth does it know how to deal with something like 'controller' which exists inside the typed/untyped object? Now I have an unknown object type with unknown/varying property types inside. I would guess var?
Just as a comment on these assumptions made by the compiler, when I see examples of unit tests created just to make sure the loosely typed stuff is included and correctly spelled and typed, I lose confidence in the value of the loosely typed approach. Am I missing something?