原文转自:http://hi.baidu.com/ysuhy/item/e9054e932d132ab8cc80e5a5
private static List CollectCellFromTDX(StockInfo stockInfo) {
string path = string.Format("{2}\\Vipdoc\\{0}\\lday\\{0}{1}.day", stockInfo.Location.ToString(),
CommonFunction.CodeToFull(stockInfo.Code),ConstData.TDXPath);
if (!File.Exists(path))
{
return null;
}
FileStream fs = File.OpenRead(path);
BinaryReader br = new BinaryReader(fs);
int days = (int)fs.Length / 32;
List list = new List();
for (int i = 0; i < days; i++)
{
StockInfo item = new StockInfo();
//item.DataDate =DateTime.Parse(new string(br.ReadChars(8)));
int date = br.ReadInt32();
int year = date / 10000;
int month = int.Parse(date.ToString().Substring(4, 2));
int day = int.Parse(date.ToString().Substring(6, 2));
int open