コード例 #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
ファイル: Single.cs プロジェクト: vitek-karas/runtime
 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);
 }