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 7635299
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T07:23:55+00:00 2026-05-31T07:23:55+00:00

I am porting a small function from C# to Objective-C (for the iPhone), and

  • 0

I am porting a small function from C# to Objective-C (for the iPhone), and I am running into a snag with a C# method.

I’m not sure what the following C# lines would equate to in Objective C. Particularly the Set Method.

BitArray bits = new BitArray(DESC_LEN);

bits.Set(j,
(ii_data[cix_1 - KERNEL_SZ/2*ii_step - KERNEL_SZ/2] +
 ii_data[cix_1 + KERNEL_SZ/2*ii_step + KERNEL_SZ/2] -
 ii_data[cix_1 - KERNEL_SZ/2*ii_step + KERNEL_SZ/2] -
 ii_data[cix_1 + KERNEL_SZ/2*ii_step - KERNEL_SZ/2])
 >
(ii_data[cix_2 - KERNEL_SZ/2*ii_step - KERNEL_SZ/2] +
 ii_data[cix_2 + KERNEL_SZ/2*ii_step + KERNEL_SZ/2] -
 ii_data[cix_2 - KERNEL_SZ/2*ii_step + KERNEL_SZ/2] -
 ii_data[cix_2 + KERNEL_SZ/2*ii_step - KERNEL_SZ/2] )
);

Does anyone have any idea what Set in C# might equate to in Objective-C. Of course I’ve done some Googling, but nothing pops out.

Cheers,
Brett

  • 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-05-31T07:23:56+00:00Added an answer on May 31, 2026 at 7:23 am

    It seems you’re looking for a way to implement bit arrays in Objective-C. There is an answer to that question here: How do I implement a bit array in C / Objective C.

    As for what the Set method does, the documentation for that is here: http://msdn.microsoft.com/en-us/library/system.collections.bitarray.set.aspx. All it does is set the bit at the given index (in this case j) with a boolean value (in this case, the result of the inequality comparison).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm porting a small C++ console application from windows to linux, GCC 4.3.2. When
I'm currently working on a small iPhone game, and am porting the 3d engine
I'm porting a library of image manipulation routines into C from Java and I'm
How would I convert a byte array, Byte[] from small to big endian. I'm
While porting an application from Linux x86 to iOS ARM (iPhone 4), I've discovered
I am considering porting a small portion of the code in a C# project
I'm porting a small C++ console game to C# and it seems that I
I have a small project I want to try porting to Python 3 -
Porting an application from C# (1.1 framework) to VB.NET (3.5 framework), and I have
Porting code from 32bit to 64bit. Lots of places with int len = strlen(pstr);

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.