Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7913983
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T13:58:23+00:00 2026-06-03T13:58:23+00:00

I was looking at enums in cocoa frameworks and I saw this: enum {

  • 0

I was looking at enums in cocoa frameworks and I saw this:

enum {  
    NSNetServiceNoAutoRename = 1UL << 0  
}; 

typedef NSUInteger NSNetServiceOptions;

and my question is how is this possible?

How is NSNetServiceOptions tied to that enum?

And is it only possible in objective c or also in c?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T13:58:26+00:00Added an answer on June 3, 2026 at 1:58 pm

    NSNetServiceOptions tied to that enum in the context that the enum is going to hold an integer value anyway. In the above example you will create a variable for the enum as,

    NSNetServiceOptions _netServiceOptions;
    

    You can even ignore the typedef and directly use,

    NSUIInteger _netServiceOptions;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: generating random enums I'm looking for the best way to select a
I was looking for something and got in to this enum is apple UITableViewCell.h.
I'm looking for an elegant way to use values in a Java enum to
recently, i am looking into assembly codes for #define, const and enum: C codes(#define):
Looking back at my past projects I often encounter this one: A client or
Was looking at how enums can be used as bit flags by decorating them
I'm looking for a faster way to use enums as parameters. like if I
I'm looking for a way to have Enum a => UArray a (which makes
typedef enum BeNeLux { BELGIUM, NETHERLANDS, LUXEMBURG } _ASSOCIATIONS_ BeNeLux; When I try to
I'm looking for the different ways to map an enum using JPA. I especially

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.