怎样把扩展名提取出来,就是取字符串的右边防前线位? string str = "Test1234";string ss = str.Substring( ex.Length-4,4); 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 呵呵 错了不好意思,应该是string str = "Test1234";string ss = str.Substring( str.Length-4,4); 怎么这样的错误信息:StartIndex cannot be less than zero. Parameter name: startIndex //取得上传文件名称fileName = System.IO.Path.GetFileName(postedFile.FileName);//取得上传文件后缀名称; fileExtension = System.IO.Path.GetExtension(fileName); CS0103: The name 'fileName' does not exist in the class or namespace 'ASP.WebForm2_aspx'还是不对呀? CS0246: The type or namespace name 'postedFile' could not be found (are you missing a using directive or an assembly reference?) string SouFileName = "sldjf.sld.jpg"//取得上传文件名称string fileName = System.IO.Path.GetFileName(SouFileName );//取得上传文件后缀名称; string fileExtension = System.IO.Path.GetExtension(fileName); c#绘图问题 vs2008工具箱里为何没有SaveFileDialog控件? 如何把字符串反转成转义码表达 winform 拖拽与mouseup疑问 求一简单的HQL语句 报表............... 怎么判断输入在textbox中的值是数字? 急!!!急!!!急!!!急!!!!!请教各位高手,添加出错误,,,在线等!!! 关于非接触卡(MF1)的问题 如何隐藏datagrid中的一列 请教一个比较麻烦的问题 ImageButton问题,附原码!
string str = "Test1234";
string ss = str.Substring( str.Length-4,4);
StartIndex cannot be less than zero. Parameter name: startIndex
fileName = System.IO.Path.GetFileName(postedFile.FileName);
//取得上传文件后缀名称;
fileExtension = System.IO.Path.GetExtension(fileName);
还是不对呀?
//取得上传文件名称
string fileName = System.IO.Path.GetFileName(SouFileName );
//取得上传文件后缀名称;
string fileExtension = System.IO.Path.GetExtension(fileName);