You can not select more than 25 topics
Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
-
- namespace Discord
- {
- internal static class ObjectExtensions
- {
- public static bool IsNumericType(this object o)
- {
- switch (Type.GetTypeCode(o.GetType()))
- {
- case TypeCode.Byte:
- case TypeCode.SByte:
- case TypeCode.UInt16:
- case TypeCode.UInt32:
- case TypeCode.UInt64:
- case TypeCode.Int16:
- case TypeCode.Int32:
- case TypeCode.Int64:
- case TypeCode.Decimal:
- case TypeCode.Double:
- case TypeCode.Single:
- return true;
- default:
- return false;
- }
- }
- }
- }
|