R – How to specify the namespace only once when using Castle.Windsor

castle-windsor

In the Castle.Windsor demo the configuration file contains

<component 
id="form.component"
type="GettingStartedPart1.Form1, GettingStartedPart1" />

Why the namespace GettingStartedPart1 is repeated? Couldn't we write just:

<component 
id="form.component"
type="GettingStartedPart1.Form1" />

?

Best Answer

it's not a namespace

when you have

"GettingStartedPart1.Form1, GettingStartedPart1"

it's:

"NamespaceName.TypeName, AssemblyName"

So you can't really omit that.

you could have:

"System.String, mscorlib"

That's not a Windsor's format BTW - it's so called fully qualified type name.

Related Topic