J
jm
From MSDN:
http://windowssdk.msdn.microsoft.com/en-us/library/scekt9xw.aspx
C# Language Reference
is (C# Reference)
Checks if an object is compatible with a given type. For example, it
can be determined if an object is compatible with the string type like
this:
if (obj is string)
{
}
I would understand this if it had said (obj is class1), but what would
it mean to say that obj is string? Is string special? Could it have
said (obj is int)? I thought "is" in C# was just for reference types.
Thank you.
http://windowssdk.msdn.microsoft.com/en-us/library/scekt9xw.aspx
C# Language Reference
is (C# Reference)
Checks if an object is compatible with a given type. For example, it
can be determined if an object is compatible with the string type like
this:
if (obj is string)
{
}
I would understand this if it had said (obj is class1), but what would
it mean to say that obj is string? Is string special? Could it have
said (obj is int)? I thought "is" in C# was just for reference types.
Thank you.