作为标题,以下代码...
System.IO.FileInfo _fInfo;
OpenFileDialog openDlg = new OpenFileDialog();
openDlg.Filter = "Csv Files (.csv)|*.csv";
openDlg.FilterIndex = 1;
openDlg.Multiselect = false;
bool? userClickedOK = openDlg.ShowDialog();
if (userClickedOK == true)
{
_fInfo = openDlg.File;
}
Stream fileStream = _fInfo.OpenRead();
using (System.IO.StreamReader reader = new StreamReader(fileStream))
{
int lineNo = 1;
while (!reader.EndOfStream)
{
reader.ReadLine();
}
}
有什么方法可以找到“_fInfo”当前编码?PS:我用的是silverlight控制台(silverlight 2.0)。