SHARE
TWEET

Latihan String IF ELSE END IF : Perbandingan Dua Kalimat

stevennathaniel Feb 3rd, 2016 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Public Class Form5
  2.  
  3.     Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
  4.         Dim str1, str2 As String
  5.  
  6.         str1 = "This is Test"
  7.  
  8.         str2 = "This is Test"
  9.  
  10.  
  11.         If (String.Compare(str1, str2) = 0) Then
  12.  
  13.             Console.WriteLine(str1 + " and " + str2 + " are equal.")
  14.  
  15.         Else
  16.  
  17.             Console.WriteLine(str1 + " and " + str2 + " are not equal ")
  18.  
  19.         End If
  20.  
  21.         Console.ReadLine()
  22.  
  23.     End Sub
  24. End Class
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top