System.Runtime.Serialization.Formatters.Binary.MessageFormatter.IsMethodPrimitive C# (CSharp) Method

IsMethodPrimitive() public static method

public static IsMethodPrimitive ( Type type ) : bool
type System.Type
return bool
		public static bool IsMethodPrimitive (Type type)
		{
			return type.IsPrimitive || type == typeof(string) || type == typeof (DateTime) || type == typeof (Decimal);
		}

Usage Example

 private static bool AllTypesArePrimitive(object[] objects)
 {
     foreach (object obj in objects)
     {
         if (obj != null && !MessageFormatter.IsMethodPrimitive(obj.GetType()))
         {
             return(false);
         }
     }
     return(true);
 }
All Usage Examples Of System.Runtime.Serialization.Formatters.Binary.MessageFormatter::IsMethodPrimitive