string[] arrTopics = {\"Health\", \"Science\", \"Politics\"};
I have an if statement like:
if (arrTopics.Count() != null)
<
To figure it out, look into geclaration of Count() extension method.
Puzzle of two pieces:
You are trying to compare non-nullable type (value of type int) with null, so non-nullable types is never being referenced to, because all non-nullable types are value types in C#, which can not be referenced.
Inequality defined through equality oerator in object class, which is defined in base. so your code mentioned above can be perfectly valid. Unfortunately, to distinguish situation when this appearance of equality operator in not desired (not overridden) in base classes there are some compiler warinings about it, because you will really get a always-false condition for incompatible types (or get an always-true condition in inequality operator)
And value types (non-nullable) and nullable types (referenced types) are incompatible types in C#. For more info look into ECMA papers for standart of definition for type system being used in a C# language.