小白求教

[复制链接]
查看11 | 回复3 | 2011-5-13 09:27:02 | 显示全部楼层 |阅读模式
public static string ApplicationRootPath = ((HttpContext.Current.Request.ApplicationPath == "/") ? "" : HttpContext.Current.Request.ApplicationPath);
public static string SiteRootPath = HttpContext.Current.Request.PhysicalApplicationPath.Substring(0, HttpContext.Current.Request.PhysicalApplicationPath.Length - 1);
private void GetParamValue(string paramStr, string paramName, ref string paramValue)

{

MatchCollection matchs = Regex.Matches(paramStr, @"{\$Ky.*?\b" + paramName + "=\"(.*?)\".*?/}", RegexOptions.IgnoreCase);

if (((matchs.Count > 0) && (matchs[0].Groups.Count > 1)) && (matchs[0].Groups[1].Value != ""))

{

paramValue = matchs[0].Groups[1].Value.ToLower();

}

}
问题:
1.((HttpContext.Current.Request.ApplicationPath == "/") ? "" : HttpContext.Current.Request.ApplicationPath);
是什么意思 作用是什么
2.HttpContext.Current.Request.PhysicalApplicationPath.Substring(0, HttpContext.Current.Request.PhysicalApplicationPath.Length - 1);
是什么意思作用是什么
3.matchs[0].Groups[1].Value.ToLower();是什么意思

回复

使用道具 举报

千问 | 2011-5-13 09:27:02 | 显示全部楼层
1、相当与if-else结构,if(HttpContext.Current.Request.ApplicationPath==“/”)HttpContext.Current.Request.ApplicationPath=""elseHttpContext.Current.Request.ApplicationPath=HttpContext.Current.Request.ApplicationPath2、获取当前正在执行的服务器应用程序的根目录的物理文件系统路径3、将matchs[0].Groups[1].Value里的字符串转换为小写其实以上的问题在MSDN中都有详细的解释,应该学会使用MSDN
回复

使用道具 举报

千问 | 2011-5-13 09:27:02 | 显示全部楼层
建议先选16-50,A6000是APS-C画幅相机,相对135相机镜头要乘以1.5系数,这样的话16-50就相当于135画幅相机的24-75,既有广角也有中焦,而28-70相当于42-105广角已经一点没有了,所以综合看还是16-50焦段适用的范围大一些。
回复

使用道具 举报

千问 | 2011-5-13 09:27:02 | 显示全部楼层
确实16-50mm对于A6000来说镜头焦段更实用,如果楼主经常拍摄风景的话可以考虑更换,不然的话现在这支镜头也基本可以满足楼主的拍摄需要了。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行