-1

Possible Duplicate:
String vs string in C#

I have a test in C# code I'm reading:

if (variable is string)

I am wondering if this is strictly equivalent to:

if (variable is String)

or if some esoteric behavior of C# autoboxing may cause these tests to behave differently.

Community
  • 1
  • 1
Kheldar
  • 5,329
  • 3
  • 30
  • 63

1 Answers1

2

They are exactly the same - string is an alias for System.String.

BrokenGlass
  • 153,880
  • 28
  • 280
  • 327