码迷,mamicode.com
首页 > 其他好文 > 详细

GetExtension 方法的使用

时间:2014-10-24 18:18:35      阅读:161      评论:0      收藏:0      [点我收藏+]

标签:style   blog   color   io   ar   使用   sp   文件   div   

Path.GetExtension

返回指定的路径字符串的扩展名。

例子1:

public static string GetExtension(
	string path
)

例子2:

取得文件的扩展名,并转换成小写

1 string fileExtension = Path.GetExtension(pic_upload.FileName).ToLower();

 

GetExtension 方法的使用

标签:style   blog   color   io   ar   使用   sp   文件   div   

原文地址:http://www.cnblogs.com/penger/p/4048878.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!