示例#1
0
文件: Array.cs 项目: meee1/mono
 internal bool InternalArray__ICollection_Remove <T> (T item)
 {
     ThrowHelper.ThrowNotSupportedException(ExceptionResource.NotSupported_FixedSizeCollection);
     return(default);
示例#2
0
文件: Array.cs 项目: meee1/mono
 internal void InternalArray__ICollection_Add <T> (T item)
 {
     ThrowHelper.ThrowNotSupportedException(ExceptionResource.NotSupported_FixedSizeCollection);
 }
示例#3
0
文件: Array.cs 项目: meee1/mono
 internal void InternalArray__ICollection_Clear()
 {
     ThrowHelper.ThrowNotSupportedException(ExceptionResource.NotSupported_ReadOnlyCollection);
 }
示例#4
0
 static sbyte INumber <sbyte> .Create <TOther>(TOther value)
 {
     if (typeof(TOther) == typeof(byte))
     {
         return(checked ((sbyte)(byte)(object)value));
     }
     else if (typeof(TOther) == typeof(char))
     {
         return(checked ((sbyte)(char)(object)value));
     }
     else if (typeof(TOther) == typeof(decimal))
     {
         return(checked ((sbyte)(decimal)(object)value));
     }
     else if (typeof(TOther) == typeof(double))
     {
         return(checked ((sbyte)(double)(object)value));
     }
     else if (typeof(TOther) == typeof(short))
     {
         return(checked ((sbyte)(short)(object)value));
     }
     else if (typeof(TOther) == typeof(int))
     {
         return(checked ((sbyte)(int)(object)value));
     }
     else if (typeof(TOther) == typeof(long))
     {
         return(checked ((sbyte)(long)(object)value));
     }
     else if (typeof(TOther) == typeof(nint))
     {
         return(checked ((sbyte)(nint)(object)value));
     }
     else if (typeof(TOther) == typeof(sbyte))
     {
         return((sbyte)(object)value);
     }
     else if (typeof(TOther) == typeof(float))
     {
         return(checked ((sbyte)(float)(object)value));
     }
     else if (typeof(TOther) == typeof(ushort))
     {
         return(checked ((sbyte)(ushort)(object)value));
     }
     else if (typeof(TOther) == typeof(uint))
     {
         return(checked ((sbyte)(uint)(object)value));
     }
     else if (typeof(TOther) == typeof(ulong))
     {
         return(checked ((sbyte)(ulong)(object)value));
     }
     else if (typeof(TOther) == typeof(nuint))
     {
         return(checked ((sbyte)(nuint)(object)value));
     }
     else
     {
         ThrowHelper.ThrowNotSupportedException();
         return(default);
示例#5
0
 public static float Create <TOther>(TOther value)
     where TOther : INumber <TOther>
 {
     if (typeof(TOther) == typeof(byte))
     {
         return((byte)(object)value);
     }
     else if (typeof(TOther) == typeof(char))
     {
         return((char)(object)value);
     }
     else if (typeof(TOther) == typeof(decimal))
     {
         return((float)(decimal)(object)value);
     }
     else if (typeof(TOther) == typeof(double))
     {
         return((float)(double)(object)value);
     }
     else if (typeof(TOther) == typeof(short))
     {
         return((short)(object)value);
     }
     else if (typeof(TOther) == typeof(int))
     {
         return((int)(object)value);
     }
     else if (typeof(TOther) == typeof(long))
     {
         return((long)(object)value);
     }
     else if (typeof(TOther) == typeof(nint))
     {
         return((nint)(object)value);
     }
     else if (typeof(TOther) == typeof(sbyte))
     {
         return((sbyte)(object)value);
     }
     else if (typeof(TOther) == typeof(float))
     {
         return((float)(object)value);
     }
     else if (typeof(TOther) == typeof(ushort))
     {
         return((ushort)(object)value);
     }
     else if (typeof(TOther) == typeof(uint))
     {
         return((uint)(object)value);
     }
     else if (typeof(TOther) == typeof(ulong))
     {
         return((ulong)(object)value);
     }
     else if (typeof(TOther) == typeof(nuint))
     {
         return((nuint)(object)value);
     }
     else
     {
         ThrowHelper.ThrowNotSupportedException();
         return(default);
示例#6
0
文件: Array.cs 项目: mt-yu/mono
 internal int GetElementSize()
 {
     ThrowHelper.ThrowNotSupportedException();
     return(0);
 }