fwstealer
asked on
csharp split string
need to get this right:
string getVal = ddlSNRN.SelectedValue.ToSt ring(); //1043...N180HM
string[] partsOfGetVal;
partsOfGetVal = getVal.Split("...".ToCharA rray());
string sn = partsOfGetVal[0]; //1043
string no = partsOfGetVal[1]; //
no seems to be returning nothing
string getVal = ddlSNRN.SelectedValue.ToSt
string[] partsOfGetVal;
partsOfGetVal = getVal.Split("...".ToCharA
string sn = partsOfGetVal[0]; //1043
string no = partsOfGetVal[1]; //
no seems to be returning nothing
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
.ToChar Array is seperating out the ... to individual "."
Removing the empty entries will work.
The Value can be found in [3] using the current code.