The Is operator determines if two object references refer to the same
object. However, it does not perform value comparisons. If object1 and
object2 both refer to the exact same object instance, result is True;
if they do not, result is False.
Is can also be used with the TypeOf keyword to make a TypeOf...Is expression, which tests whether an object variable is compatible with a data type.
See below.
Using both the Is and the Object.ReferenceEquals when comparing s1 and s2 returns true.
However Is returns true when comparing s3 and s4 but the Object.ReferenceEquals method returns false because although they are have identical string values, that string is not interned.
String s1 = "String1";
String s2 = "String1";
Console.WriteLine("s1 = s2: {0}", Object.ReferenceEquals(s1, s2));
Console.WriteLine("{0} interned: {1}", s1,
String.IsNullOrEmpty(String.IsInterned(s1)) ? "No" : "Yes");
String suffix = "A";
String s3 = "String" + suffix;
String s4 = "String" + suffix;
Hope this helps.