#define compileErrorsNot

using System;
using System.Data;
using System.Data.SqlTypes;

class app
{
	static void Main()
	{
		Console.WriteLine("try explicit cast to SqlInt32");
		try
		{
			SqlInt64 i64 = SqlInt64.Null;
			SqlInt32 i32 = (SqlInt32)i64;
		}
		catch
		{
			Console.WriteLine("explicit cast to SqlInt32 failed");
		}
		Console.WriteLine("try implicit cast to SqlInt64");
		try
		{
			SqlInt32 i32 = SqlInt32.Null;
			SqlInt64 i64 = i32;
		}
		catch
		{
			Console.WriteLine("implicit cast to SqlInt64 failed");
		}
		Console.WriteLine("try explicit cast to bool");
		try
		{
			SqlBoolean b = SqlBoolean.Null;
			bool b1 = (bool)b;
		}
		catch
		{
			Console.WriteLine("explicit cast to bool failed");
		}
	}
}

