TaoBaoKe.Utl/Integer.cs

(开头部分) 2KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.Text;


public class IntegerHandling
{
    public IntegerHandling()
    {

    }

    public static int GetInteger(string s)
    {
        bool isInt;
        int result;

        isInt = false;
        result = ConstInvalid.Int;

        if (!System.String.IsNullOrEmpty(s))
        {
            isInt = int.TryParse(s, out result);
        }

        return result;
    }

    public static long GetLonger(string s)
    {
        bool isInt;
        long result;

        isInt = false;
        result = 0;

        if (!System.String.IsNullOrEmpty(s))
        {
            isInt = long.TryParse(s, out result);
        }

        return result;
    }

    public static int GetInteger(object obj)
    {
        return obj != null ? GetInteger(obj.ToString()) : ConstInvalid.Int;
    }

    public static bool IsInteger(string s)
    {
        bool isInt = false;
        int result;

        if (!System.String.IsNullOrEmpty(s))
        {
            isInt = int.TryParse(s, out result);
        }

        return isInt;
后面还有 37 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。