.Net Cobol class:
$set ilusing "CSharpPrograms"
class-id. CobolMain.
method-id. main public.
invoke type Console::WriteLine("CobolMain: Hello World")
invoke type CSharpSub::DisplayMethod()
end method main.
end class.
C# Class:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
// This is an experiment of calling a C# program from a Cobol main program.
namespace CSharpPrograms
{
public class CSharpSub
{
public void DisplayMethod()
{
Console.WriteLine("CSharpSub: Hello World");
}
static void Main()
{
}
}
}
When building, I get the error below in the Cobol class. I have tried many things. Is there some special Cobol syntax I am not using? Thanks.
Error 1 COBCH0829: Could not find method 'DisplayMethod' with this signature