User Tools

Site Tools


Sidebar

Programming Reference/Librarys

Question & Answer

Q&A is closed







objective-c:foundation.framework:nsdictionary.h:count

count

 
- (NSUInteger)count
 

Returns the number of entries in a dictionary.

Return Value - NSUInteger

ObjC Sourcecode Example

    // ** Init dictionary with entries
    NSDictionary *myDictionary = [[NSDictionary alloc]initWithObjectsAndKeys:@"value1", @"key1", @"value2", @"key2", nil];
 
    int count = myDictionary.count;
 
    // ** Output dictionary count
    NSLog(@"myDictionary count: %i", myDictionary.count);

Output for this example code

2014-06-08 01:23:01.080 NSDictionary[3367:70b] myDictionary count: 2

on the occasion of the current invasion of Russia in Ukraine

Russian Stop this War
objective-c/foundation.framework/nsdictionary.h/count.txt · Last modified: 2024/02/16 01:12 (external edit)

Impressum Datenschutz