字符串问题。麻烦大家帮忙哟。急!!! 读入一个字符串。形如:abcd|cdbe|asdw.将它按‘|’分开来,然后负给一个字符串数组。应该如何做呀? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 string[] arr = "abcd|cdbe|asdw".Split('|'); string str="abcd|cdbe|asdw";string[] temp=str.Split('|'); 对了。忘了说。我是修改别人的程序。修改后就debug跟踪。可结果一直是之前的结果。没反映出我修改后应该有的变化。这是不是因为我的修改没被发现,还是什么原因呢? string[] arr = "abcd|cdbe|asdw".Split('|'); 在debug时,发现执行的程序还是修改前的,有可能是没有编译的问题。在Build(生成)-Configuration Manager(配置管理器)里,把你的项目都勾上。 我把工程全部关闭了。然后再打开,一个一个的加。然后一起重新编译。然后再在我修改的地方debug跟踪。可到了我修改的地方还是跳过。天呀。怎么办呀?我也编译生成了最新的dll和pdb文件。可结果还是原来的。大家救救我吧。我还有哪做错了吗?苦恼呀! 刚把\obj\Debug下的临时文件都删除了。然后再编译。结果还是没变。 部分代码如下。无论我怎么改都没用。应该不是 代码的问题。但我找不到原因哟。希望大家帮帮我呀override protected object GetResult() { InitRequestDom(); string dataSource = Request["dataSource"]; string universe = (m_inputXml.SelectSingleNode("//UNIVERSE") == null ? null : m_inputXml.SelectSingleNode("//UNIVERSE").InnerText); string universeCode = (m_inputXml.SelectSingleNode("//UNIVERSECODE") == null ? null : m_inputXml.SelectSingleNode("//UNIVERSECODE").InnerText); string findBy = (m_inputXml.SelectSingleNode("//FINDBY") == null ? null : m_inputXml.SelectSingleNode("//FINDBY").InnerText); string findValue = (m_inputXml.SelectSingleNode("//FINDVALUE") == null ? null : m_inputXml.SelectSingleNode("//FINDVALUE").InnerText.Trim()); string[] findValues = findValue.Split(','); findValue = ""; for(int i = 0; i < findValues.Length; i++) { findValues[i] = findValues[i].Trim().ToUpper(); if(findValues[i].EndsWith(".LW")) findValues[i] = SecurityUtil.GetMatchedTicker(findValues[i]); if(findValues[i] != "") { if(findValue != "") findValue += ","; findValue += findValues[i]; } } string bOrc = (m_inputXml.SelectSingleNode("//BORC") == null ? null : m_inputXml.SelectSingleNode("//BORC").InnerText); string rFrom = (m_inputXml.SelectSingleNode("//RFROM") == null ? null : m_inputXml.SelectSingleNode("//RFROM").InnerText); string rNum = (m_inputXml.SelectSingleNode("//RNUM") == null ? null : m_inputXml.SelectSingleNode("//RNUM").InnerText); XmlDocument xmlDoc = new XmlDocument(); if(dataSource == "AWD") { Guid guid = DataTypeUtil.ObjectGuidValue(null); AWDEnvironment environment = new AWDEnvironment(guid, guid, guid,"MSTAR2", "", "EN", guid); MemoryStream stream = new MemoryStream(1024*50); XmlTextWriter writer = new XmlTextWriter(stream, AWDEnvironment.s_DefaultEncoding); ArrayList secDataList = new ArrayList(); string strUniverse = null; string countryOfSale = "USA"; if(universeCode != null) { strUniverse = AwsUtil.getAWDStrUniByUniType(universeCode.Substring(3)); countryOfSale = universeCode.Substring(0,3); } else AwsUtil.getAWDStrUniverse(universe); CSecIdList resultlist = null; XmlDocument xmlSearch = new XmlDocument(); xmlSearch.LoadXml("<search/>"); xmlSearch.DocumentElement.Attributes.Append(xmlSearch.CreateAttribute("univ")); xmlSearch.DocumentElement.Attributes["univ"].InnerText = strUniverse; if(strUniverse == "VA") { switch(findBy) { case "0": //find by VA Policy //resultlist = CFind.findByName(findValue.ToLower(), (bOrc == "0" ? CFind.SearchRelation.StartsWith : CFind.SearchRelation.Contains), strUniverse, true, environment, AWDConnection.CurrentData); XmlNode nodeSearch = xmlSearch.CreateElement("s"); nodeSearch.Attributes.Append(xmlSearch.CreateAttribute("f")); nodeSearch.Attributes["f"].InnerText = "OS02F"; nodeSearch.Attributes.Append(xmlSearch.CreateAttribute("op")); nodeSearch.Attributes["op"].InnerText = "="; nodeSearch.Attributes.Append(xmlSearch.CreateAttribute("v")); nodeSearch.Attributes["v"].InnerText = findValue; xmlSearch.DocumentElement.AppendChild(nodeSearch); break; case "1": //find by VA Subaccount name //resultlist = CFind.findByName(findValue.ToLower(), (bOrc == "0" ? CFind.SearchRelation.StartsWith : CFind.SearchRelation.Contains), strUniverse, true, environment, AWDConnection.CurrentData); //resultlist = CFind.findByName(findValues, (bOrc == "0" ? CFind.SearchRelation.StartsWith : CFind.SearchRelation.Contains), strUniverse, "", true, environment, AWDConnection.CurrentData); for(int i = 0; i < findValues.Length; i++) { XmlNode nodeSearchByName = xmlSearch.CreateElement("s"); if(i != 0) { nodeSearchByName.Attributes.Append(xmlSearch.CreateAttribute("rel")); nodeSearchByName.Attributes["rel"].InnerText = "or"; } nodeSearchByName.Attributes.Append(xmlSearch.CreateAttribute("f")); nodeSearchByName.Attributes["f"].InnerText = "OS01W"; nodeSearchByName.Attributes.Append(xmlSearch.CreateAttribute("op")); nodeSearchByName.Attributes["op"].InnerText = "like"; nodeSearchByName.Attributes.Append(xmlSearch.CreateAttribute("v")); if(bOrc == "0") //begin with nodeSearchByName.Attributes["v"].InnerText = findValues[i] + "%"; else //contains nodeSearchByName.Attributes["v"].InnerText = "%" + findValues[i] + "%"; xmlSearch.DocumentElement.AppendChild(nodeSearchByName); } break; case "2": //find VA Policy list strUniverse = "VP"; xmlSearch.DocumentElement.Attributes["univ"].InnerText = strUniverse; for(int i = 0; i < findValues.Length; i++) { XmlNode nodeSearchByName = xmlSearch.CreateElement("s"); if(i != 0) { nodeSearchByName.Attributes.Append(xmlSearch.CreateAttribute("rel")); nodeSearchByName.Attributes["rel"].InnerText = "or"; } nodeSearchByName.Attributes.Append(xmlSearch.CreateAttribute("f")); nodeSearchByName.Attributes["f"].InnerText = "OS01W"; nodeSearchByName.Attributes.Append(xmlSearch.CreateAttribute("op")); nodeSearchByName.Attributes["op"].InnerText = "like"; nodeSearchByName.Attributes.Append(xmlSearch.CreateAttribute("v")); if(bOrc == "0") //begin with nodeSearchByName.Attributes["v"].InnerText = findValues[i] + "%"; else //contains nodeSearchByName.Attributes["v"].InnerText = "%" + findValues[i] + "%"; xmlSearch.DocumentElement.AppendChild(nodeSearchByName); } //resultlist = CFind.findByName(findValue.ToLower(), (bOrc == "0" ? CFind.SearchRelation.StartsWith : CFind.SearchRelation.Contains), strUniverse, true, environment, AWDConnection.CurrentData); break; } } else { if(strUniverse != "ST") { XmlNode nodeSearch = xmlSearch.CreateElement("s"); nodeSearch.Attributes.Append(xmlSearch.CreateAttribute("f")); nodeSearch.Attributes["f"].InnerText = "OS019"; nodeSearch.Attributes.Append(xmlSearch.CreateAttribute("op")); nodeSearch.Attributes["op"].InnerText = "="; nodeSearch.Attributes.Append(xmlSearch.CreateAttribute("v")); nodeSearch.Attributes["v"].InnerText = countryOfSale; xmlSearch.DocumentElement.AppendChild(nodeSearch); } switch(findBy) { case "0": //find by name for(int i = 0; i < findValues.Length; i++) { XmlNode nodeSearchByName = xmlSearch.CreateElement("s"); if(strUniverse != "ST") { nodeSearchByName.Attributes.Append(xmlSearch.CreateAttribute("rel")); if(i == 0) { nodeSearchByName.Attributes["rel"].InnerText = "and"; nodeSearchByName.Attributes.Append(xmlSearch.CreateAttribute("lp")); nodeSearchByName.Attributes["lp"].InnerText = "("; } else nodeSearchByName.Attributes["rel"].InnerText = "or"; } else if(i != 0) { nodeSearchByName.Attributes.Append(xmlSearch.CreateAttribute("rel")); nodeSearchByName.Attributes["rel"].InnerText = "or"; } nodeSearchByName.Attributes.Append(xmlSearch.CreateAttribute("f")); nodeSearchByName.Attributes["f"].InnerText = "OS01W"; nodeSearchByName.Attributes.Append(xmlSearch.CreateAttribute("op")); nodeSearchByName.Attributes["op"].InnerText = "like"; nodeSearchByName.Attributes.Append(xmlSearch.CreateAttribute("v")); if(bOrc == "0") //begin with nodeSearchByName.Attributes["v"].InnerText = findValues[i] + "%"; else //contains nodeSearchByName.Attributes["v"].InnerText = "%" + findValues[i] + "%"; if(i == findValues.Length - 1 && strUniverse != "ST") { nodeSearchByName.Attributes.Append(xmlSearch.CreateAttribute("rp")); nodeSearchByName.Attributes["rp"].InnerText = ")"; } xmlSearch.DocumentElement.AppendChild(nodeSearchByName); } break; case "1": //find by ticker XmlNode nodeSearchByTicker = xmlSearch.CreateElement("s"); if(xmlSearch.DocumentElement.SelectNodes("s").Count > 0) { nodeSearchByTicker.Attributes.Append(xmlSearch.CreateAttribute("rel")); nodeSearchByTicker.Attributes["rel"].InnerText = "and"; } nodeSearchByTicker.Attributes.Append(xmlSearch.CreateAttribute("f")); nodeSearchByTicker.Attributes["f"].InnerText = "OS001"; nodeSearchByTicker.Attributes.Append(xmlSearch.CreateAttribute("op")); nodeSearchByTicker.Attributes["op"].InnerText = "in"; nodeSearchByTicker.Attributes.Append(xmlSearch.CreateAttribute("v")); for(int i = 0; i < findValues.Length; i++) { if(nodeSearchByTicker.Attributes["v"].InnerText != "") nodeSearchByTicker.Attributes["v"].InnerText += ","; nodeSearchByTicker.Attributes["v"].InnerText += "'" + findValues[i] + "'"; } xmlSearch.DocumentElement.AppendChild(nodeSearchByTicker); break; case "ISIN": //find by ISIN XmlNode nodeSearchByISIN = xmlSearch.CreateElement("s"); if(xmlSearch.DocumentElement.SelectNodes("s").Count > 0) { nodeSearchByISIN.Attributes.Append(xmlSearch.CreateAttribute("rel")); nodeSearchByISIN.Attributes["rel"].InnerText = "and"; } nodeSearchByISIN.Attributes.Append(xmlSearch.CreateAttribute("f")); nodeSearchByISIN.Attributes["f"].InnerText = "OS05J"; nodeSearchByISIN.Attributes.Append(xmlSearch.CreateAttribute("op")); nodeSearchByISIN.Attributes["op"].InnerText = "in"; nodeSearchByISIN.Attributes.Append(xmlSearch.CreateAttribute("v")); for(int i = 0; i < findValues.Length; i++) { if(nodeSearchByISIN.Attributes["v"].InnerText != "") nodeSearchByISIN.Attributes["v"].InnerText += ","; nodeSearchByISIN.Attributes["v"].InnerText += "'" + findValues[i] + "'"; } xmlSearch.DocumentElement.AppendChild(nodeSearchByISIN); break; } } "abcd|cdbe|asdw"最后应该也加一个"|" 。string[] arr="abcd|cdbe|asdw|".split("|") "abcd|cdbe|asdw"最后应该也加一个"|" 。string[] arr="abcd|cdbe|asdw|".split("|")正解 关掉VS,把bin目录删除重新编译试试。代码实在太长了,你自己用断点跟踪看看吧。 多谢这么多人的热心帮助。关于不能调试的问题已经解决了。好像是机器有点问题。现在好了。关于上一个字符串的处理问题。可以用如下方式:string[] arr="abcd|cdbe|asdw".split("|");for(int i = 0;i< arr.length;i++){arr[i]=arr[i].substring(0,3);}要是还有更好的方法请告诉我。谢谢了!愿热爱这个行业的各位兄弟姐妹们前程似锦。大家共同努力吧。有相关的好东西请放上来,大家一起探讨吧! 下一步问题:将字符串分开后,放到xml节点下。然后查找,可无法找到数据。这是什么原因呢?比如以前单个串是这样的:<whatever>c="usa"</whatever>。现在是这样的:<whatever>c="'usa','ita','fra'"</whatever>.这样改后找不到相关信息。看各位高手知道是何原因否。 用C#编写的记事本,将它设为文本的默认启动程序 wpf数据绑定的问题 关于Microsoft Office Document Imaging的问题? 探讨C#异步和同步 NET安装和部署 怎样用c# ado.net 在内存中创建一个临时的Table textBox的输入限制问题 如何在线程中创建进度条 winfrom动态加入对象如何定位 如何绘制 二次曲线? eg. y=x*x 满分请求一条SQL语句 急问关于同步进度条的问题
string[] temp=str.Split('|');
在Build(生成)-Configuration Manager(配置管理器)里,把你的项目都勾上。
override protected object GetResult()
{
InitRequestDom();
string dataSource = Request["dataSource"];
string universe = (m_inputXml.SelectSingleNode("//UNIVERSE") == null ? null : m_inputXml.SelectSingleNode("//UNIVERSE").InnerText);
string universeCode = (m_inputXml.SelectSingleNode("//UNIVERSECODE") == null ? null : m_inputXml.SelectSingleNode("//UNIVERSECODE").InnerText);
string findBy = (m_inputXml.SelectSingleNode("//FINDBY") == null ? null : m_inputXml.SelectSingleNode("//FINDBY").InnerText);
string findValue = (m_inputXml.SelectSingleNode("//FINDVALUE") == null ? null : m_inputXml.SelectSingleNode("//FINDVALUE").InnerText.Trim());
string[] findValues = findValue.Split(',');
findValue = "";
for(int i = 0; i < findValues.Length; i++)
{
findValues[i] = findValues[i].Trim().ToUpper();
if(findValues[i].EndsWith(".LW"))
findValues[i] = SecurityUtil.GetMatchedTicker(findValues[i]);
if(findValues[i] != "")
{
if(findValue != "")
findValue += ",";
findValue += findValues[i];
}
}
string bOrc = (m_inputXml.SelectSingleNode("//BORC") == null ? null : m_inputXml.SelectSingleNode("//BORC").InnerText);
string rFrom = (m_inputXml.SelectSingleNode("//RFROM") == null ? null : m_inputXml.SelectSingleNode("//RFROM").InnerText);
string rNum = (m_inputXml.SelectSingleNode("//RNUM") == null ? null : m_inputXml.SelectSingleNode("//RNUM").InnerText);
XmlDocument xmlDoc = new XmlDocument(); if(dataSource == "AWD")
{
Guid guid = DataTypeUtil.ObjectGuidValue(null);
AWDEnvironment environment = new AWDEnvironment(guid, guid, guid,"MSTAR2", "", "EN", guid);
MemoryStream stream = new MemoryStream(1024*50);
XmlTextWriter writer = new XmlTextWriter(stream, AWDEnvironment.s_DefaultEncoding); ArrayList secDataList = new ArrayList(); string strUniverse = null;
string countryOfSale = "USA";
if(universeCode != null)
{
strUniverse = AwsUtil.getAWDStrUniByUniType(universeCode.Substring(3));
countryOfSale = universeCode.Substring(0,3);
}
else
AwsUtil.getAWDStrUniverse(universe);
CSecIdList resultlist = null;
XmlDocument xmlSearch = new XmlDocument();
xmlSearch.LoadXml("<search/>");
xmlSearch.DocumentElement.Attributes.Append(xmlSearch.CreateAttribute("univ"));
xmlSearch.DocumentElement.Attributes["univ"].InnerText = strUniverse; if(strUniverse == "VA")
{
switch(findBy)
{
case "0": //find by VA Policy
//resultlist = CFind.findByName(findValue.ToLower(), (bOrc == "0" ? CFind.SearchRelation.StartsWith : CFind.SearchRelation.Contains), strUniverse, true, environment, AWDConnection.CurrentData);
XmlNode nodeSearch = xmlSearch.CreateElement("s");
nodeSearch.Attributes.Append(xmlSearch.CreateAttribute("f"));
nodeSearch.Attributes["f"].InnerText = "OS02F";
nodeSearch.Attributes.Append(xmlSearch.CreateAttribute("op"));
nodeSearch.Attributes["op"].InnerText = "=";
nodeSearch.Attributes.Append(xmlSearch.CreateAttribute("v"));
nodeSearch.Attributes["v"].InnerText = findValue; xmlSearch.DocumentElement.AppendChild(nodeSearch);
break;
case "1": //find by VA Subaccount name
//resultlist = CFind.findByName(findValue.ToLower(), (bOrc == "0" ? CFind.SearchRelation.StartsWith : CFind.SearchRelation.Contains), strUniverse, true, environment, AWDConnection.CurrentData);
//resultlist = CFind.findByName(findValues, (bOrc == "0" ? CFind.SearchRelation.StartsWith : CFind.SearchRelation.Contains), strUniverse, "", true, environment, AWDConnection.CurrentData);
for(int i = 0; i < findValues.Length; i++)
{
XmlNode nodeSearchByName = xmlSearch.CreateElement("s");
if(i != 0)
{
nodeSearchByName.Attributes.Append(xmlSearch.CreateAttribute("rel"));
nodeSearchByName.Attributes["rel"].InnerText = "or";
}
nodeSearchByName.Attributes.Append(xmlSearch.CreateAttribute("f"));
nodeSearchByName.Attributes["f"].InnerText = "OS01W";
nodeSearchByName.Attributes.Append(xmlSearch.CreateAttribute("op"));
nodeSearchByName.Attributes["op"].InnerText = "like";
nodeSearchByName.Attributes.Append(xmlSearch.CreateAttribute("v"));
if(bOrc == "0") //begin with
nodeSearchByName.Attributes["v"].InnerText = findValues[i] + "%";
else //contains
nodeSearchByName.Attributes["v"].InnerText = "%" + findValues[i] + "%"; xmlSearch.DocumentElement.AppendChild(nodeSearchByName);
}
break;
case "2": //find VA Policy list
strUniverse = "VP";
xmlSearch.DocumentElement.Attributes["univ"].InnerText = strUniverse;
for(int i = 0; i < findValues.Length; i++)
{
XmlNode nodeSearchByName = xmlSearch.CreateElement("s");
if(i != 0)
{
nodeSearchByName.Attributes["rel"].InnerText = "or";
}
nodeSearchByName.Attributes.Append(xmlSearch.CreateAttribute("f"));
nodeSearchByName.Attributes["f"].InnerText = "OS01W";
nodeSearchByName.Attributes.Append(xmlSearch.CreateAttribute("op"));
nodeSearchByName.Attributes["op"].InnerText = "like";
nodeSearchByName.Attributes.Append(xmlSearch.CreateAttribute("v"));
if(bOrc == "0") //begin with
nodeSearchByName.Attributes["v"].InnerText = findValues[i] + "%";
else //contains
nodeSearchByName.Attributes["v"].InnerText = "%" + findValues[i] + "%"; xmlSearch.DocumentElement.AppendChild(nodeSearchByName);
}
//resultlist = CFind.findByName(findValue.ToLower(), (bOrc == "0" ? CFind.SearchRelation.StartsWith : CFind.SearchRelation.Contains), strUniverse, true, environment, AWDConnection.CurrentData);
break;
}
}
else
{
if(strUniverse != "ST")
{
XmlNode nodeSearch = xmlSearch.CreateElement("s");
nodeSearch.Attributes.Append(xmlSearch.CreateAttribute("f"));
nodeSearch.Attributes["f"].InnerText = "OS019";
nodeSearch.Attributes.Append(xmlSearch.CreateAttribute("op"));
nodeSearch.Attributes["op"].InnerText = "=";
nodeSearch.Attributes.Append(xmlSearch.CreateAttribute("v"));
nodeSearch.Attributes["v"].InnerText = countryOfSale;
xmlSearch.DocumentElement.AppendChild(nodeSearch);
}
switch(findBy)
{
case "0": //find by name
for(int i = 0; i < findValues.Length; i++)
{
XmlNode nodeSearchByName = xmlSearch.CreateElement("s");
if(strUniverse != "ST")
{
nodeSearchByName.Attributes.Append(xmlSearch.CreateAttribute("rel"));
if(i == 0)
{
nodeSearchByName.Attributes["rel"].InnerText = "and";
nodeSearchByName.Attributes.Append(xmlSearch.CreateAttribute("lp"));
nodeSearchByName.Attributes["lp"].InnerText = "(";
}
else
nodeSearchByName.Attributes["rel"].InnerText = "or";
}
else if(i != 0)
{
nodeSearchByName.Attributes.Append(xmlSearch.CreateAttribute("rel"));
nodeSearchByName.Attributes["rel"].InnerText = "or";
}
nodeSearchByName.Attributes.Append(xmlSearch.CreateAttribute("f"));
nodeSearchByName.Attributes["f"].InnerText = "OS01W";
nodeSearchByName.Attributes.Append(xmlSearch.CreateAttribute("op"));
nodeSearchByName.Attributes["op"].InnerText = "like";
nodeSearchByName.Attributes.Append(xmlSearch.CreateAttribute("v"));
if(bOrc == "0") //begin with
nodeSearchByName.Attributes["v"].InnerText = findValues[i] + "%";
else //contains
nodeSearchByName.Attributes["v"].InnerText = "%" + findValues[i] + "%"; if(i == findValues.Length - 1 && strUniverse != "ST")
{
nodeSearchByName.Attributes.Append(xmlSearch.CreateAttribute("rp"));
nodeSearchByName.Attributes["rp"].InnerText = ")";
}
xmlSearch.DocumentElement.AppendChild(nodeSearchByName);
}
break;
case "1": //find by ticker
XmlNode nodeSearchByTicker = xmlSearch.CreateElement("s");
if(xmlSearch.DocumentElement.SelectNodes("s").Count > 0)
{
nodeSearchByTicker.Attributes.Append(xmlSearch.CreateAttribute("rel"));
nodeSearchByTicker.Attributes["rel"].InnerText = "and";
}
nodeSearchByTicker.Attributes.Append(xmlSearch.CreateAttribute("f"));
nodeSearchByTicker.Attributes["f"].InnerText = "OS001";
nodeSearchByTicker.Attributes.Append(xmlSearch.CreateAttribute("op"));
nodeSearchByTicker.Attributes["op"].InnerText = "in";
nodeSearchByTicker.Attributes.Append(xmlSearch.CreateAttribute("v"));
for(int i = 0; i < findValues.Length; i++)
{
if(nodeSearchByTicker.Attributes["v"].InnerText != "")
nodeSearchByTicker.Attributes["v"].InnerText += ",";
nodeSearchByTicker.Attributes["v"].InnerText += "'" + findValues[i] + "'";
}
xmlSearch.DocumentElement.AppendChild(nodeSearchByTicker);
break;
case "ISIN": //find by ISIN
XmlNode nodeSearchByISIN = xmlSearch.CreateElement("s");
if(xmlSearch.DocumentElement.SelectNodes("s").Count > 0)
{
nodeSearchByISIN.Attributes.Append(xmlSearch.CreateAttribute("rel"));
nodeSearchByISIN.Attributes["rel"].InnerText = "and";
}
nodeSearchByISIN.Attributes.Append(xmlSearch.CreateAttribute("f"));
nodeSearchByISIN.Attributes["f"].InnerText = "OS05J";
nodeSearchByISIN.Attributes.Append(xmlSearch.CreateAttribute("op"));
nodeSearchByISIN.Attributes["op"].InnerText = "in";
nodeSearchByISIN.Attributes.Append(xmlSearch.CreateAttribute("v"));
for(int i = 0; i < findValues.Length; i++)
{
if(nodeSearchByISIN.Attributes["v"].InnerText != "")
nodeSearchByISIN.Attributes["v"].InnerText += ",";
nodeSearchByISIN.Attributes["v"].InnerText += "'" + findValues[i] + "'";
}
xmlSearch.DocumentElement.AppendChild(nodeSearchByISIN);
break;
}
}
正解
string[] arr="abcd|cdbe|asdw".split("|");
for(int i = 0;i< arr.length;i++)
{
arr[i]=arr[i].substring(0,3);
}
要是还有更好的方法请告诉我。谢谢了!
愿热爱这个行业的各位兄弟姐妹们前程似锦。大家共同努力吧。有相关的好东西请放上来,大家一起探讨吧!