开发者

null reference exception was unhandled C#

开发者 https://www.devze.com 2023-01-08 23:10 出处:网络
private void StartReadInlay2() { byte[] cSN = new byte[8]; byte[] sw12 = new byte[2]; string strsw12 = \"\", errdes = \"\", result = \"\";
private void StartReadInlay2()
    {
        byte[] cSN = new byte[8];           
        byte[] sw12 = new byte[2];
        string strsw12 = "", errdes = "", result = "";

        test1_2 = new Initialisation();

        test1_2.logmode = Convert.ToInt32(ConfigurationSettings.AppSettings["LogMode"]);
        test1_2.iChipType = GetChipType(lblChipType.Text.Trim());

        //--initialise test
        result = test1_2.Initialise(1, **configXML.fnSamSlot**, configXML, ref cSN, ref sProgress1_2, ref lProcess1_2, ref sw12, ref errdes);
  开发者_开发问答      scSN1_2 = Hex.ToHexString(test1_2.chipID);
        strsw12 = Hex.ToHexString(sw12);

        if (strsw12.Equals("0000"))
            errInlay1_2 = result.ToString();
        else
            errInlay1_2 = result.ToString() + strsw12;

        lProcess1_2 = 2;

        if(!errInlay1_2.Equals(""))
            StatusInlay1_2 = false;
        else
            StatusInlay1_2 = true;
    }


well for starters your entire code example is in C# and will definitely blow up if you're trying to write a VB.NET application.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号