SMBServer v1.0.5

This commit is contained in:
Tal Aloni 2016-12-22 20:51:16 +02:00
parent b75820452d
commit bd1006cb81
400 changed files with 28062 additions and 0 deletions

View file

@ -0,0 +1,52 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Web;
namespace Utilities
{
public partial class Conversion
{
public static int ToInt32(object obj)
{
return ToInt32(obj, 0);
}
public static int ToInt32(object obj, int defaultValue)
{
int result = defaultValue;
if (obj != null)
{
try
{
result = Convert.ToInt32(obj);
}
catch
{}
}
return result;
}
public static long ToInt64(object obj)
{
return ToInt64(obj, 0);
}
public static long ToInt64(object obj, long defaultValue)
{
long result = defaultValue;
if (obj != null)
{
try
{
result = Convert.ToInt64(obj);
}
catch
{ }
}
return result;
}
}
}