c#编写wp7程序,无法读取wav文件数据
代码如下using System;
using System.Collections.Generic;
using System.Linq;
using
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;
using
using System.Text;
namespace one
{
public partial class MainPage : PhoneApplicationPage
{ // Constructor
public MainPage()
{
InitializeComponent();
Test();
……………………
}
public void Test()
{
string path = @"路径";
FileInfo fi = new FileInfo(strpath);
fs = fi.OpenRead();
byte[] bInfo = new byte[44];
fs.Read(bInfo, 0, 44);
……………………
}
}
运行时,fs为null,提示错误Attempt to access the method failed: (System.String),本人初学啊,菜鸟一枚,请高手支招,谢谢啦