<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreFoundation",
  "identifier" : "/documentation/CoreFoundation/CFNumberGetType(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core Foundation"
    ],
    "preciseIdentifier" : "c:@F@CFNumberGetType"
  },
  "title" : "CFNumberGetType(_:)"
}
-->

# CFNumberGetType(_:)

Returns the type used by a CFNumber object to store its value.

```
func CFNumberGetType(_ number: CFNumber!) -> CFNumberType
```

## Parameters

`number`

The CFNumber object to examine.

## Return Value

A constant that indicates the data type of the value contained in `number`. See [`CFNumberType`](/documentation/CoreFoundation/CFNumberType) for a list of possible values.

## Discussion

The type specified in the call to [`CFNumberCreate(_:_:_:)`](/documentation/CoreFoundation/CFNumberCreate(_:_:_:)) is not necessarily preserved when a new CFNumber object is created—it uses whatever internal storage type the creation function deems appropriate.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)