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");
}
}这段代码没有问题,我试了。
解决方案 »
- Metro C# 写文件的问题
- C#中ICustomFormatter接口的问题
- 请教一个字符串比较的问题,求最简洁有效的方法
- 请教如何取得调用堆栈里方法的参数值
- Regex.IsMatch(str,"^[0-9]*[1-9][0-9]*$")是什么意思?
- Combox 中绑定简单数据 显示Text和得到Value真的都要用到数据表吗,太麻烦了!
- 如何才能使DataTimePicker控件里面的日期时间除了鼠标选择外还可以自己手动输入?
- 有没有方法可以通过自己写的程序把Outlook Express的邮件账户给导出来?
- winfrom 屏蔽按钮对Enter的响应
- MVC2 帮我看看这个网站为什么点击详情是404,路由没有用,要怎么弄
- 新手问题第十四帖-------------------如何在datagrid中加入按钮。
- 如何更改DataGrid最左边的一列的宽度也就是带箭头的那一列
于是我把 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());
}
}
}