---
title: object_getInstanceVariable
framework: objectivec
role: symbol
role_heading: Function
path: objectivec/object_getinstancevariable
---

# object_getInstanceVariable

Obtains the value of an instance variable of a class instance.

## Declaration

```occ
extern Ivarobject_getInstanceVariable(id obj, const char *name, void **outValue);
```

## Parameters

- `obj`: A pointer to an instance of a class. Pass the object containing the instance variable whose value you wish to obtain.
- `name`: A C string. Pass the name of the instance variable whose value you wish to obtain.
- `outValue`: On return, contains a pointer to the value of the instance variable.

## Return Value

Return Value A pointer to the Ivar data structure that defines the type and name of the instance variable specified by name.

## See Also

### Working with Instances

- [object_copy](objectivec/object_copy.md)
- [object_dispose](objectivec/object_dispose.md)
- [object_setInstanceVariable](objectivec/object_setinstancevariable.md)
- [object_getIndexedIvars(_:)](objectivec/object_getindexedivars(_:).md)
- [object_getIvar(_:_:)](objectivec/object_getivar(_:_:).md)
- [object_setIvar(_:_:_:)](objectivec/object_setivar(_:_:_:).md)
- [object_getClassName(_:)](objectivec/object_getclassname(_:).md)
- [object_getClass(_:)](objectivec/object_getclass(_:).md)
- [object_setClass(_:_:)](objectivec/object_setclass(_:_:).md)
