装箱和拆箱
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
/*PrintStr();
PrintNum();*/
int i = 10;
int j = 20;
int s = 30;
//Console.WriteLine("i的值为{0},j的值为{1},s的值为{2}",i,j,s);
Console.WriteLine("i的值为{0},j的值为{1},s的值为{2}", i.ToString(), j.ToString(), s.ToString());
Console.ReadKey();
}
private static void PrintStr()
{
string name = "张三";
Console.WriteLine(name);
}
private static void PrintNum()
{
int age = 20;
Console.WriteLine(age);
}
}
}