Question

I want to use such a CreateInstance-Function as the following one for GeckoFx in VB.NET.

Xpcom.CreateInstance<nsILoginManager>("@mozilla.org/login-manager;1");

The code above works fine for C-Sharp but not for VB.NET, what should I use instead?

If I try Xpcom.CreateInstance(nsILoginManager)("@mozilla.org/login-manager;1") I get an Error for as the following one :

"This [nsILoginManager] is a type and cannot be used as Expression"

What else should I write/use?

The reason why I try this is to activate the historisation for fields in the webbrowser-component.

Was it helpful?

Solution

VB.NET uses of keyword to specify type.

Try this:

Xpcom.CreateInstance(Of nsILoginManager)("@mozilla.org/login-manager;1")
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top