Use Equal to compare Data type : Wrapped Type « Data Type « VB.Net Tutorial






Imports System.Collections

public class Test
   public Shared Sub Main
               Dim s1 As New String("Hello")
               Dim s2 As New String("Hello")
               Console.WriteLine(s1.Equals(s2))
               s1 = s2         
               Console.WriteLine(s1.Equals(s2))

               Dim n1 As New Integer()
               Dim n2 As New Integer()
               n1 = 10
               n2 = 10

               Console.WriteLine(n1.Equals(n2))
               n1 = 20
               Console.WriteLine(n1.Equals(n2))
   End Sub
End class
True
True
True
False








2.43.Wrapped Type
2.43.1.Wrapped Type
2.43.2.Show .Net Command Types
2.43.3.Use Equal to compare Data type