language: C# (mono-2.8)
date: 708 days 22 hours ago
link:
visibility: public
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
using System;
 
public class Test
{
    public static void Main()
    {
        typeof(string).GetField("Empty").SetValue(null, "evil");//from DailyWTF
        Console.WriteLine(String.Empty);//check
        //how does it behave?
        if ("evil" == String.Empty) Console.WriteLine("equal"); 
        //output: 
        //evil 
        //equal
        }
}
http://stackoverflow.com/questions/6293924/evil-code-confusion-how-does-it-even-compile