using System;
using System.Collections.Generic;
using System.Text;namespace ConsoleApplication2
{
class Program
{
static void Main(string[] args)
{
int a = 1;
int c = 2;
bool b = true;
int i = (int)b;
if (a is int)
{
Console.WriteLine("a is int");
if (a > 1)
Console.WriteLine(" a is bigger than 1.");
else
Console.WriteLine("a is not bigger than 1.");
}
if (b)
Console.WriteLine("b is true");
if (a < c)
Console.WriteLine("b is true");
}
}
}
using System.Collections.Generic;
using System.Text;namespace ConsoleApplication2
{
class Program
{
static void Main(string[] args)
{
int a = 1;
int c = 2;
bool b = true;
int i = (int)b;
if (a is int)
{
Console.WriteLine("a is int");
if (a > 1)
Console.WriteLine(" a is bigger than 1.");
else
Console.WriteLine("a is not bigger than 1.");
}
if (b)
Console.WriteLine("b is true");
if (a < c)
Console.WriteLine("b is true");
}
}
}
解决方案 »
- 用FindWindowEx找不到句柄,各位进来帮下
- 关于一个时间段的问题,谁帮帮忙
- 急问!winform调用webservice接口
- 请教winform下水晶报表的使用
- 新建项目的时候“库没有注册”
- 请问如何在控制台程序中更规则的输出数据?
- FTP 上传报错,在线等大师回复.. T.T
- ADO.NET里最简单的添加记录的方式是什么?闹了半天,发现ADO.NET怎么还不如ADO呢?怎么实现ADO里的AddNew呢?
- 我想在启动机器时就启动我的exe?
- 请问在浏览器有一条凹下去得线怎么做出来得在c#,用什么控件?
- 谁有together for vs.net 2005的crack
- 请问,这个ListBox拖放,为什么不成功
bool 无法转为int型
永为真
这句注释掉,b是bool型,无法转成int型,C++就可以
if (a is int)
没什么意思!