int s = 5; int? s_null; long t; long? t_null; t = s; //隱式轉換 S -> T s = (int)t; //顯示轉換 T -> S s_null = s; //隱式轉換 S -> S? s = (int)s_null; //顯示轉換 S? -> T t_null = s_null; //隱式轉換 S? -> T? s_null = (int?)t_null; //顯示轉換 T? -> S? t_null = s; //隱式轉換 S -> T? s = (int)t_null; //顯示轉換 T? -> S