Q:

How to remove the zero value? 

private void serialPort_DataReceived(object sender, System. IO.Ports. SerialDataReceivedEventArgs e)
    {
        if (Clos_flag) return;
        try
        {
            Listening = true;
            if (serialPort. IsOpen)
            {
                this.txt_weight. Invoke(new MethodInvoker(delegate
               {

                   //txt_weight. Text = serialPort. ReadLine();
                   serialPort. NewLine = "\r";
                   string weight = serialPort. ReadLine();
                   if (weight. IndexOf(")") > 0)
                   {
                       weight = weight. Substring(3, 8);
                       // txt_weight. Text = weight. Substring(0, weight. LastIndexOf("0") + 1);
                   }
               }));

            }
        }
        catch (Exception eg)
        {
            MessageBox. Show(eg. ToString());
        }
        finally
        {
            Listening = false;
        }
    }

What should i change to remove the first zero in the picture, above is the code i use.  I tried to change the substring to (2,8) but still it is not working. 
I get the value from a weighing machine, once the user click the "Open Serial Port" button

A:

Change this line:  
string weight = serialPort. ReadLine();

to this:
string weight = serialPort. ReadLine().TrimStart('0').Trim();

What that will do is readline, trim the first 0, then trim the outside (start amd end) blank spaces before loading the value into the declared variable 

