Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

Compile and Execute VB.Net Online

Imports System.Text.RegularExpressions
Imports System.Data.Common
Imports System.Collections
Imports System.Collections.Generic

Module VBModule

    Sub Main()
        Dim tom As String = "abc;def;ghi"
        Dim knt As String() = tom.Split(";"c)
        Dim key As String = "ww41238"
        Dim rgx As Regex = New Regex( "\d+" )
        Dim num As Match = rgx.Match( key )
        Dim connParm As String = "authenticationtype=$CP_AuthenticationType$;cacheschema=$CP_CacheSchema$;clienttimeout=$CP_ClientTimeout$;guid attribute=$CP_Guid_Attribute$;ismovesupported=False;isrenamesupported=False;password=$CP_Password$;passwordattribute=userPassword;port=$CP_Port$;protocolversion=3;revisionattributes=createTimestamp%0007modifyTimestamp;rootentry=$CP_RootEntry$;server=$CP_Server$;setpwdmethod=Default;usepartitionedsearch=False;username=$CP_Username$;usessl=$CP_UseSSL$;usestarttls=$CP_UseStartTLS$"

        Console.WriteLine(tom)
        Console.WriteLine(num.Value)
        Console.WriteLine(knt( CInt(num.Value) Mod knt.Length ))

        If tom Like "abc*" Then
            Console.WriteLine("Like-Vergleich: " & tom)
        End If

        Dim objKey As String = "<Key><T>Org</T><P>5b682383-f99c-4bdb-83d2-56bc0609b5f3</P></Key>"
        Console.WriteLine(objKey)
        objKey = objKey.Replace("<Key><T>Org</T><P>", "")
        Console.WriteLine(objKey)
        
        Dim builder As New DbConnectionStringBuilder
        builder.ConnectionString = connParm
        
        Dim keys As ICollection = builder.Keys

        For Each key As String In keys
            Dim retval As String = builder.Item(key)
            Dim valMatch As Match = Regex.Match(retval, "^\$(\w+)\$$", RegexOptions.IgnoreCase)
            If valMatch.Success Then
                Console.WriteLine("{0}={1}", key, valMatch.Groups(1).Value)
            End If
        Next
        
        Dim hugo As New List(Of String)
        hugo.Add("Alpha")
        hugo.Add("Beta")
        hugo.Add("Delta")
        Console.WriteLine(String.Join(";", hugo.ToArray))
    End Sub
  
End Module

Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.