I can't get a grip on how the various "Init", "Accumulate" ... methods work, to enable calling a method located inside a DLL, from VB.Net code.

Let's say the method to call has the following signature :

```
public double ComputeMeanPosition(ref SortedList<DateTime, double> posByTime)

```

Would you please kindly point me to an actual example of the use of the methods, or simply give me a few hints as how to actually pass the parameters to the method, call it and fetch the results ?

@Olivier Jacot-Descombes: I definitely prefix the class name by the namespace name, but yet fail to be able to reach the object. In fact I am surprised that your kind suggestion does not involve the following methods, displayed through introspection of the loaded DLL : 

```
Type: MyClassName
        Method: Void Init()
        Method: Void Accumulate(System.Data.SqlTypes.SqlDouble, System.Data.SqlTypes.SqlDateTime, System.Data.SqlTypes.SqlBoolean)
        Method: Void Merge(MyClassName)
        Method: System.Data.SqlTypes.SqlDouble Terminate()
        Method: Void Write(System.IO.BinaryWriter)
        Method: Void Read(System.IO.BinaryReader)
        Method: Boolean Equals(System.Object)
        Method: Int32 GetHashCode()
        Method: System.String ToString()
        Method: System.Type GetType()

```

**EDIT**

In fact I have a code similar to the following one, that successfully manages to inspect the DLL and gets several types and methods out of it, giving the following results above for the method I would like to call.

Here is the code

> 
> 
> ```
>         For Each oneModule As Reflection.Module In useAssembly.GetLoadedModules()
>             Console.WriteLine("   - " & oneModule.Name)
>             For Each oneType As System.Type In oneModule.GetTypes()
>                 Console.WriteLine("     Type: " & oneType.Name)
>                 For Each oneField As Reflection.FieldInfo In oneType.GetFields()
>                     Console.WriteLine("        Field: " & oneField.ToString())
>                 Next oneField
> 
>                 For Each oneMethod As Reflection.MethodInfo In oneType.GetMethods()
>                     Console.WriteLine("        Method: " & oneMethod.ToString())
> 
>                     [[ ADD "Invoke" here ?]]
>                 Next oneMethod
>             Next oneType
>         Next oneModule
> 
> ```
> 
> 

At the end, it seems that the [[...]] is at the place where the Invoke method should be called to call the method of my choice, but that is where I'm stuck... Would I need to build an object before calling it ? How should I pass it the parameters ? How to get the result ?