日期:2014-05-18  浏览次数:20694 次

新手求教。。。。
//MP3Info.cs
C# code

using System;
using System.Collections.Generic;
using System.Text;

namespace WindowsApplication1
{
    public class MP3Info
    {
        private int tagLen = 128;
        private string mp3Tag = string.Empty;
        private string title = string.Empty;

        public string MP3Tag
        {
            get { return mp3Tag; }
            set { mp3Tag = value; }
        }

        public string Title
        {
            get { return title; }
            set { title = value; }
        }
    }
}





//Form1.cs
C# code

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;

namespace WindowsApplication1
{
    public partial class Form1 : Form
    {
   
    }
    
    MP3Tag="";   //这句为什么不能通过呢?
}




------解决方案--------------------
C# code
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;

namespace WindowsApplication1
{
    public partial class Form1 : Form
    {
     

      public Form1()
      {
     MP3Info mp3=new MP3Info();
     mp3.MP3Tag="";
     }
   
    }
    
  }