Ultime notizie
Home » Archivio per il tag: VB.NET

Archivio per il tag: VB.NET

[VB.NET] : Inviare una mail in formato HTML

[sourcecode language=”vb”] Function SendEmail(ByVal ToAddress As String, ByVal FromAddress As String, ByVal MessageSubject As String, ByVal MessageBody As String) Dim MessageHead As String = "<html><head>" MessageHead = MessageHead & "<style " MessageHead = MessageHead & "body {background-color:#F7F7F7; color:#000; font-family:arial,verdana,sans-serif; font-size:12px;}" MessageHead = MessageHead & "</style></head></body>" Dim MessageFoot As String = "</body></html>" MessageBody = MessageHead & MessageBody & MessageFoot Dim ReturnMessage …

Continua a leggere »

VB.NET : Come Invertire una stringa

[sourcecode language=”vb”] Module RevString Sub Main() Dim inputString As String = Console.ReadLine() ReverseOrder(inputString) End Sub Private Sub ReverseOrder(ByVal textInput As String) Dim text2Rev As String = textInput Dim reversed As String Dim charArray() As Char = textInput.ToCharArray() Array.Reverse(charArray) reversed = charArray Console.WriteLine("") Console.WriteLine("Testo originale: " + text2Rev) Console.WriteLine("Testo invertito: " + reversed) End Sub End Module [/sourcecode]

Continua a leggere »