I was discovering a open source operating system's code that has been written in C#
, and I saw the following check:
if (String.Empty == null)
throw new Exception("Compiler didn't initialize System.String.Empty!");
It looked like a meaningless check to me but since I saw it in the source code of an operating system, I thought I may be missing something. Is there any chance that string.Empty
can be null ?
Note: Here is the source code if you are interested to see