为何输出char的默认值时,输出了a
今天用vs2013用c#输出char的默认值,结果输出了a,如下:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace 开始
{
class Program
{
static void Main(string[] args)
{
char y = new char();
Console.WriteLine(y);
}
}
}
但我查了很多地方,连msdn中也说char的默认值是'\0',那么为何会输出a