http://community.csdn.net/Expert/topic/3476/3476829.xml?temp=.0182001

解决方案 »

  1.   

    http://msdn.microsoft.com/vcsharp/default.aspx
      

  2.   

    using System;
    using System.IO;
    public class TextFromFile 
    {
    private const string FILE_NAME = "f.txt";
    private const string FILE_NAME1 = "f1.txt";
    public  void Convert() 
    {
    if (!File.Exists(FILE_NAME)) 
    {
    Console.WriteLine("{0} 不存在。", FILE_NAME);
    return;
    }
    if (File.Exists(FILE_NAME1)) 
    {
    Console.WriteLine("{0} 已存在。", FILE_NAME1);
    return;
    }
    StreamReader sr = File.OpenText(FILE_NAME);
    string input;
    while ((input=sr.ReadLine())!=null) 
    {
    char[] a = input.ToCharArray();
    for(int i=0; i<a.Length; i++)
    {
    if( a[i]==',')
       {
       a[i]=' ';
       }
    Console.Write(a[i]);
    }

    StreamWriter sr1 = File.CreateText(FILE_NAME1);
    sr1.WriteLine (a);
    sr1.Close();
    }
    Console.WriteLine ();
    Console.WriteLine ("格式转换已经结束");
    sr.Close();

    }
    }
    这是一个简单的格式转换的小程序
      

  3.   

    VS.NET 自带的Duwamish7是一个很经典的例子。不妨好好研究研究。
      

  4.   

    http://msdn.microsoft.com/library/chs/default.asp?url=/library/CHS/cpref/html/frlrfSystemWindowsFormsTreeViewClassTopic.asp