Evaluate Boolen expression using Compute Method of Data table in VB.net

Posted by Rajnilari2015 under VB.NET category on | Points: 40 | Views : 640
Say we want to evaluate a boolean expression at runtime say True And True Or False. We can use

Imports System.Data
Namespace ConsoleApplication1

Public Class Program

Public Shared Sub Main()

Dim dt As New DataTable()
Dim result = dt.Compute("True And True Or False", "")
End Sub
End Class
End Namespace

Comments or Responses

Login to post response