lwjab

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
 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编辑  收藏  举报