I have samples of C# code that I need to use to instantiate an object. I need to convert it to VB.net.I have a dll called ProjectUtilities. It is referenced in .net as "InteractiveSoftworks.VoiceNet.ProjectUtilities"I need to instantiate the ProjectManager object of the dll, but in order to do that it requires certain values to be passed.Here is the C# code:(Class Constructor):Public ProjectManager(string sSystemDatabase, ScriptModel[] arrScm, IScriptModelFactory objScmFactory)(Actual instantiation):ProjectManager pm = new ProjectManager("Voicenet", new ScriptModel [] {scriptmodel.AgentScriptModel, ScriptModel.IVRScriptModel}, new ScriptModelFactory());
The constructor requires 3 arguments1. A string2. An array of constants3. An objectHere is my code in VB.NET:Dim oScriptModelFactory As New InteractiveSoftworks.VoiceNet.ProjectUtilities.ScriptModelFactoryDim oScriptModel As New InteractiveSoftworks.VoiceNet.ProjectUtilities.ScriptModelDim arrScriptModel(,)'I am setting the constants hereDim sAgentScriptModel = InteractiveSoftworks.VoiceNet.ProjectUtilities.ScriptModel.AgentScriptModelDim sIVRScriptModel = InteractiveSoftworks.VoiceNet.ProjectUtilities.ScriptModel.IVRScriptModel'Now trying to pass themDim oProjectManager As New InteractiveSoftworks.VoiceNet.ProjectUtilities.ProjectManager("NG2468", arrScriptModel(sAgentScriptModel, sIVRScriptModel), oScriptModelFactory)
I'm getting Object Refernce Not Set to Instance of ObjectAm I passing the array incorrectly?I would appreciate any help,Ninel