string tagStr ="type =";// (string)curTN.Tag;
int numInt;
if (tagStr != "")
{
numInt = tagStr.IndexOf("type");
if ( numInt == 1)
{
tagStr.IndexOf("type");
}
}这段代码没有问题,我试了。
int numInt;
if (tagStr != "")
{
numInt = tagStr.IndexOf("type");
if ( numInt == 1)
{
tagStr.IndexOf("type");
}
}这段代码没有问题,我试了。
于是我把 tagStr.IndexOf("type") 拷贝到监视窗口,提示 错误:“tagStr.IndexOf”不存在
理由我说不清楚
另外NHU老兄你在if里面写了个tagStr.IndexOf("type");干吗啊??private void button1_Click(object sender, System.EventArgs e)
{
string tagStr ="type =";// (string)curTN.Tag;
int numInt;
if (tagStr != "")
{
numInt = tagStr.IndexOf("type");
if ( numInt == 0)
{
MessageBox.Show(numInt.ToString());
}
}
}