문제

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.

도움이 되었습니까?

해결책

VB.NET uses of keyword to specify type.

Try this:

Xpcom.CreateInstance(Of nsILoginManager)("@mozilla.org/login-manager;1")
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top