You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
565 B
29 lines
565 B
namespace BBWYB.Common.Extensions
|
|
{
|
|
public static class ConverterExtensions
|
|
{
|
|
public static long? ToInt64(this object? o)
|
|
{
|
|
try
|
|
{
|
|
return Convert.ToInt64(o);
|
|
}
|
|
catch
|
|
{
|
|
return null;
|
|
}
|
|
}
|
|
|
|
public static int? ToInt32(this object? o)
|
|
{
|
|
try
|
|
{
|
|
return Convert.ToInt32(o);
|
|
}
|
|
catch
|
|
{
|
|
return null;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|