using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace 运算符
{
class Program
{
static void Main(string[] args)
{
Single a = 100.1F;
Single b = 200.2F;
bool c = a == b;
Console.WriteLine(c);
bool d = a < b;
Console.WriteLine(d);
Console.ReadLine();
}
}
}
C#的运算符。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace 装箱与拆箱
{
class Program
{
static void Main(string[] args)
{
int i = 2009;
object a = i;//装箱
Console.WriteLine(a);
int j = (int)a;//拆箱
Console.WriteLine(j);
Console.ReadLine();
}
}
}
c#装箱与拆箱