-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,361
  • 3
  • 34
  • 63

1 Answers1

2

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

BrokenGlass
  • 158,293
  • 28
  • 286
  • 335