none
重載的問題? RRS feed

  • 問題

  • 請教一個小問題,當我在compiler會出現

    Error 1 No overload for method 'LS_DRIVER' takes '1' arguments

     

    StreamInterfaceDriver的用法參考:

    http://www.opennetcf.com/library/sdf/html/1e664b5d-cdc4-0c23-602b-d21a98eecaeb.htm

     

    Code Snippet

     

    namespace LightSensorOpenNETCF
    {
        public partial class Form1 : Form
        {
          
            static string prefix = "LSR1:";

            FileAccess access = FileAccess.Read;
            FileShare fireshare = FileShare.ReadWrite;

            LS_DRIVER LightSensor = new LS_DRIVER( prefix );

            public Form1()
            {
                InitializeComponent();        
            }

            private void button1_Click(object sender, EventArgs e)
            {
                LightSensor.OpenDevice(access, fireshare);
            }

            ......
        }


        public class LS_DRIVER : StreamInterfaceDriver
        {
            public void OpenDevice(FileAccess access, FileShare fireshare)
            {

                base.Open(access, fireshare);
            }
            .....  

        }
    }

     

     

    請各位大大指點一下 感謝
    2008年3月10日 上午 10:49