Create a new .NET (VB/C#) project or use an existing project

Implement
the following function, e.g. in a class "TestClass.cs":
namespace CSharpGuiXT
{
public class TestClass
{
public string HelloCSharp()
{
string returnstring = "Hello CSharp!";
return returnstring;
}
}
}


Now enter
the path to the DLL in the GuiXT profile:

Copy all used DLL files into this directory.
Important: The file guinet.dll, which is included in the GuiXT setup, must also be located in this directory.
Attention: When calling a function, the DLL is loaded into memory
and the corresponding file cannot be overwritten.
Close all SAP GUI windows before using a modified version.
In a
GuiXT Script or InputScript you call the .NET (VB/C#) function using the
keyword "CallVB":
CallVB msg = Utilities.TestClass.HelloCSharp
message "&V[msg]" -statusline
That means:
The .NET (VB/C#) function "HelloCSharp" of the class "TestClass" in the
class library "utilities.dll" is called and the result is placed into the GuiXT variable V[msg].
If you are not
interested in the return value, you can simply call a .NET (VB/C#) function with
GuiXT
CallVB Utilities.TestClass.HelloCSharp
to call it.
As a result,
an SAP GUI message appears with the text from the .NET (VB/C#) function:
