会员
众包
新闻
博问
闪存
云市场
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
lwjab
博客园
::
首页
::
博问
::
闪存
::
新随笔
::
联系
::
订阅
::
管理
::
公告
c# 中字符和ASCII之间的相互转换
string
mapIndex
=
Request.QueryString[
"
map_index
"
];
string
firstIndex
=
mapIndex.Substring(
0
,
1
);
string
lastIndex
=
mapIndex.Substring(
1
);
string
northIndex1
=
string
.Empty;
if
(lastIndex
==
"
1
"
)
{
northIndex1
=
lastIndex;
}
else
{
northIndex1
=
Convert.ToString(Convert.ToInt32(lastIndex)
-
1
);
}
string
northIndex
=
firstIndex
+
northIndex1;
//
向上
string
eastIndex1
=
string
.Empty;
if
(firstIndex
==
"
j
"
)
{
eastIndex1
=
firstIndex;
}
else
{
eastIndex1
=
Convert.ToString((
char
)((
short
)Convert.ToChar(firstIndex)
+
1
));
}
string
eastIndex
=
eastIndex1
+
lastIndex;
posted on
2005-10-22 13:34
lwj
阅读(
1575
) 评论(
0
)
编辑
收藏
举报
会员力量,点亮园子希望
刷新页面
返回顶部