문제

what is the major reason for The System.Type class to hold the "IsPointer" property?

I have read that it could be used as the "Isprimitive" to check if the type is primitive or not. is that correct?

도움이 되었습니까?

해결책

The primitive types are Boolean, Byte, SByte, Int16, UInt16, Int32, UInt32, Int64, UInt64, Char, Double, and Single.

IsPointer - indicates whether the Type is a pointer. Pointer call can be declared even in C# in unsafe block:

unsafe struct Node
{
    public Node* NextNode;
}

다른 팁

Just quoting from MSDN:

Type.IsPointer Property - Gets a value indicating whether the Type is a pointer.

Type.IsPrimitive Property - Gets a value indicating whether the Type is one of the primitive types.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top