is Pattern
An is expression that tests a value against a type or another pattern.
What is is Pattern in C#?
is Pattern — An is expression that tests a value against a type or another pattern.
class LabelReader
{
int LengthOf(object value)
{
if (value is string text)
{
return text.Length;
}
return 0;
}
}
Level: Journeyman · More C# terms at this level
Updated