C# Calling a module from a referenced application


I have an application that is being used to call a function from another application, (which I have referenced as a dll).  I can use the functions from the classes in the application, but there is a function that references a module that I cannot retrieve the value from.  Any idea on how to access that module?
Who is Participating?
sameer_goyalConnect With a Mentor Commented:

So you should be able to do this

assuming that the Mod1() method returns a string

string SchedID = testInfo.Mod1(pass the required parameters);

and you should be able to use SchedID whereever you want.

The only thing to check is, if Mod1() is defined as Public in Application1
Hi Jasmin01,

Are you getting an error/exception when yo try to reference the module or you are not getting the result as expected?
Jasmin01Author Commented:
I am getting an error on this line:

sSql = "Exec " & sProcName & " " & "'" & SchedID

The SchedID comes from the module, and as a result, the error is : "Object reference not set to an instance of object."
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

can you post the line of code where you are calling the module to get SchedID?
Jasmin01Author Commented:
I haven't done that.  Dont know how.  The only thing I have done is added a "using Application1" on my main class, and called the class using
  Info testInfo = new Info();

What do I need to do to call my module Mod1?
If this module that you are refrring to is a function or method inside Info class, then simply


However, it seems you are mixing C# and VB.NET here

what language was used to develop the Application1? I am somehow sure that your current application is C#
Jasmin01Author Commented:
Application 1 is written in VB.net and I am using C# to do my current application.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.