|
|
|
Thanks to COM Interop, you can still use the Microsoft Script Control from VB.NET and any other .NET language. To do so, you must add a reference to the Microsoft Script Control library (from the COM page in the Add Reference dialog box): this action creates a new reference named Interop.MSScriptControl, which enables you to use the Script control with early binding. The following code uses the Eval method to evaluate a math expression from VB.NET: |
Click here to copy the following block | Dim sc As New MSScriptControl.ScriptControl()
sc.Language = "VBScript"
Dim espr As String = "12 + 3 * 10" Dim res As Double = sc.Eval(expr)
Console.WriteLine("{0} = {1}", expr, res) |
|
|
|
Submitted By :
Nayan Patel
(Member Since : 5/26/2004 12:23:06 PM)
|
|
|
Job Description :
He is the moderator of this site and currently working as an independent consultant. He works with VB.net/ASP.net, SQL Server and other MS technologies. He is MCSD.net, MCDBA and MCSE. In his free time he likes to watch funny movies and doing oil painting. |
View all (893) submissions by this author
(Birth Date : 7/14/1981 ) |
|
|