Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Request some example codes on these new features
#4
Copied from VbExec help:
Macro Macro2064
Code:
Copy      Help
VbExec ""
#ret
Imports System
Imports System.Windows.Forms
Module Module1
Sub Main()
;Console.WriteLine("VB")
;MessageBox.Show("VB")
End Sub
End Module

Copied from VbFunc help:
Macro Macro2064
Code:
Copy      Help
;example with code in string and using Module
str code=
;Imports System
;Public Module Test
;Function Add(a as Integer, b as Integer) As Integer
;;Return a+b
;End Function
;End Module
out VbFunc(code 5 2)

;example with code in same macro and using Class
out VbFunc("" 5 2)
#ret
Imports System
Public Class Test
Public Shared Function Add(a as Integer, b as Integer) As Integer
;Return a+b
End Function
End Class

Example using CsScript class:
Macro Macro2064
Code:
Copy      Help
CsScript x.SetOptions("language=VB")
x.AddCode(code)
;then use x.Call or x.CreateObject like with C#
_______________

Yes, must be 2.3.5.9. Thank you.


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)