C# System.Collections.Generic.List`1
От: kudzu  
Дата: 11.05.10 11:26
Оценка:
Здравствуйте!
Есть txt-файл, с содержимым:

ADD BRD: FN=1, SN=2, BP=BACK, BT=E32, HBT=ME32, BS=LOADSHARE, BN=9, ADS=ACTIVE;
ADD BRD: FN=1, SN=3, BP=BACK, BT=E32, HBT=ME32, BS=LOADSHARE, BN=16, ADS=ACTIVE;
................................................................................
ADD BRD: FN=1, SN=15, BP=BACK, BT=E32, HBT=ME32, BS=LOADSHARE, BN=3, ADS=ACTIVE;


из, которого хочу создать объекты со значениями FN=, SN=, BN= и вывести их с помощью такого кода:


using System;
using System.Linq;
using System.Collections.Generic;
using System.Collections;

public partial class _class : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        string[] umg_conf = System.IO.File.ReadAllLines(@"c:\mml.txt");
        
        foreach (string name in umg_conf)
        {

            if (name.Contains("ADD BRD: ") == true)
            {
                if (name.Contains(" BP=BACK, BT=E32, HBT=ME32, BS=LOADSHARE, "))
                {
                    string[] stringArray = name.Split(',');
                    IEnumerable<board_me32> queryNames =
                        from strItem in stringArray
                        let x=stringArray
                        select new board_me32()
                            {
                                board_no = x[6].Substring(4),
                                sl_no=x[1].Substring(4),
                                Fr_no=x[0].Substring(12)
                            };
                    List<board_me32> all_boards = queryNames.ToList();
                    poisk(all_boards);
                    
                }
            }
        }
    }
    
    
    public void poisk(params object [] all_boards)
    {
        for (int i = 0; i < all_boards.Length; i++)
        {
            Response.Write(all_boards[i] + "<br />");
        }
    }


    
    class board_me32
    {
        public string board_no { get; set; }
        public string sl_no { get; set; }
        public string Fr_no { get; set; }
    }
    
}


а в результате выводится:
System.Collections.Generic.List`1[_class+board_me32]
...................................................
System.Collections.Generic.List`1[_class+board_me32]


что я делаю не так? подскажите
 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.