Mike Mays

Mike Mays

  • NA
  • 3
  • 20.9k

System.Linq.Strings is inaccessible due to its protection level

Dec 2 2010 3:16 PM

Hello,
I'm trying to enhance a program that one of our ex employee's built but not having much luck. I'm totally new to C# but have built other small programs using vb 2008. What I'm trying to do is take a textbox that gets populated from a barcode label using a symbol scanner and split the information into two other textboxes I have done this successfully in VB but C# throws a System.Linq.Strings is inaccessible due to its protection level. I'v searched and cant seem to find the solution. The program works as designed but when I insert the following code I get the error. Anyone wanna take a crack at it thanks. STRINGS is were the error is occurring
 private void OrderNumber_TextChanged(object sender, EventArgs e)
{
Array split = ScannedBC.Text.Split('-');
if (split.Length == 2)
{
OrderNumber.Text = Strings.Split(0);
ShipNumber.Text = Strings.Split(1);
ShipNumber.Text = ShipNumber.Text.Substring(3, ShipNumber.Text.Length - 3);
OrderNumber.Text = OrderNumber.Text.Substring(1, OrderNumber.Text.Length - 1);
}
}
}
}
here are the references
using
Microsoft.VisualBasic;
using
System;
using
System.Collections;
using
System.Collections.Generic;
using
System.ComponentModel;
using
System.Data;
using
System.Diagnostics;
using
System.Data.SqlClient;
using
System.Drawing;
using
System.Linq;
using
System.Text;
using
System.Windows.Forms;

Answers (4)