8b9b85e7f5
Former-commit-id: 172c8e3c300b39d5785c7a3e8dfb08ebdbc1a99b
39 lines
596 B
C#
39 lines
596 B
C#
using System;
|
|
|
|
namespace testcase
|
|
{
|
|
public class Program
|
|
{
|
|
public static int Main ()
|
|
{
|
|
DateTime? dt = null;
|
|
var res1 = default (DateTime?) == dt;
|
|
if (!res1)
|
|
return 5;
|
|
|
|
DateTime? a = default (DateTime?);
|
|
DateTime? b = default (DateTime?);
|
|
bool res = a == b;
|
|
if (!res)
|
|
return 4;
|
|
|
|
res = a != b;
|
|
if (res)
|
|
return 3;
|
|
|
|
decimal? D1 = null;
|
|
decimal? D2 = 7;
|
|
|
|
if (D1 == D2) {
|
|
Console.WriteLine ("null == 7 incorrect");
|
|
return 1;
|
|
} else if (D1 != D2) {
|
|
Console.WriteLine ("null != 7 correct");
|
|
return 0;
|
|
}
|
|
return 2;
|
|
}
|
|
}
|
|
}
|
|
|