24 lines
480 B
C#
24 lines
480 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace KssSmaPlaLib.Commons
|
|
{
|
|
public static class IntUxer
|
|
{
|
|
public static int StrToInt(string str, int defaultValue)
|
|
{
|
|
if (int.TryParse(str, out int intValue))
|
|
{
|
|
return intValue;
|
|
}
|
|
else
|
|
{
|
|
return defaultValue;
|
|
}
|
|
}
|
|
}
|
|
}
|