怎样把扩展名提取出来,就是取字符串的右边防前线位? 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#调用sql server 2005 Reporting services的例子 用户层、业务层、数据库,分别在不同的三台机器上。 字符串格式化问题,烦死我了,一个假期都没想出来. 怎样在C#.NET中进行XML串行化的传输 诚征用C#做过SGIP或者CMPP协议接口的朋友. 如何做一款产品降价通知软件 存储过程的问题! C#中调用Windows API的要点 请教一个比较麻烦的问题 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);