我有以下代码:
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
namespace Test
{
public partial class MainPage : PhoneApplicationPage
{
Microphone microphone = Microphone.Default;
public MainPage()
{
InitializeComponent();
microphone = Microphone.Default;
microphone.BufferReady += new EventHandler<EventArgs>(microphone_BufferReady);
但是在运行调试器时会在最后一行中断并出现System.NullReferenceException
错误。我究竟做错了什么?