Tools, FAQ, Tutorials:
"MyLibApp.vb" - Call VB Class from Library
How to call a function from a VB class provided in a library?
✍: FYIcenter.com
If you want to call a function from a VB class provided in a library,
you can follow this tutorial:
1. Reference the shared function with the class name prefix:
MyLib.PrintHello();
2. See the following full source code example, MyLibApp.vb:
' MyLibApp.vb
' Copyright (c) FYIcenter.com
Module MyLibApp
Sub Main()
MyLib.PrintHello()
End Sub
End Module
3. Compile the code with the "vbc /reference" command:
>vbc /reference:MyLib.dll MyLibApp.vb Microsoft (R) Visual Basic Compiler version 2.2.0.61624 Copyright (C) Microsoft Corporation. All rights reserved. >dir MyLibApp.* 09:55 AM 6,656 MyLibApp.exe 09:53 AM 134 MyLibApp.vb
4. Run the executable code:
C:\fyicenter>MyLibApp.exe Hello world! - From MyLib
⇒ First Visual C# Program in Visual Studio 2017
⇐ "MyLib.vb" - VB Class and Library
2017-08-13, ∼3553🔥, 0💬
Popular Posts:
What validation keywords I can use in JSON Schema to specifically validate JSON Array values? The cu...
Tools, FAQ, Tutorials: JSON Validator JSON-XML Converter XML-JSON Converter JSON FAQ/Tutorials Pytho...
What's Wrong with "while ($c=fgetc($f)) {}" in PHP? If you are using "while ($c=fgetc($f)) {}" to lo...
How to use "{{...}}" Liquid Codes in "set-body" Policy Statement? The "{{...}}" Liquid Codes in "set...
How to use the API operation 2017 version setting "Rewrite URL template"? The API operation setting ...