Imports System Imports uCalcSoftware Public Module Program Public Sub Main() Dim uc As New uCalc() Dim t = uc.NewTransformer() Dim ruleA = t.FromTo("a", "A") '// Case 1: Limit is 2, but 3 'a's are present. The rule is invalidated. t.Transform("a b a c a") ruleA.Maximum = 2 Console.WriteLine("--- Maximum = 2 (Rule Fails) ---") Console.Write("Result: ") Console.WriteLine(t.Transform("a b a c a")) '// Case 2: Limit is 3. The rule passes and matches are kept. ruleA.Maximum = 3 Console.WriteLine("") Console.WriteLine("--- Maximum = 3 (Rule Succeeds) ---") Console.Write("Result: ") Console.WriteLine(t.Transform("a b a c a")) End Sub End Module