Converting VbScript functions (Right, Len, IsNumeric, CInt) in C#

后端 未结 4 722
死守一世寂寞
死守一世寂寞 2021-01-29 08:19

Again, I have got below code in VbScript, can you please suggest what will be equivalent code in C#.

Function GetNavID(Tit         


        
4条回答
  •  一个人的身影
    2021-01-29 08:43

    Try:

    if (NavigationId.StartsWith("S"))
    {
        NavigationId = NavigationId.Substring(1);
        int id;
        if (int.TryParse(NavigationId,out id))
        {
            if (id > 0)
            {
            }
        }
    }
    

提交回复
热议问题