I was just eager to know, Why identity === operator isn’t available in c#?. Is there any reason that isn’t available. What is the equalant to === operator in c#?
Because I saw in a place that identity operator === is faster that equal == operator.
Because == operator change the datatype temporarily.
Update: Difference between === and == operator.
=== basically doesn’t convert the two variable into temporarily data type while == equal temporarily convert the data type of converted variables
Because
ReferenceEqualsexists.Because value types override equality.
Because C#, unlike JavaScript doesn’t have “truthy” and “falsy” values and the implicit conversions are well defined.
In short, it doesn’t exist because it is not needed in C#, unlike JavaScript.