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

  • Home
  • SEARCH
  • 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 6889421
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:09:15+00:00 2026-05-27T06:09:15+00:00

I Wanted to convert a c# code to j# and somehow managed to get

  • 0

I Wanted to convert a c# code to j# and somehow managed to get over dllimport and marshalas.

Problem is, when a function has a reference to an object – ref isn’t recognized

public static native int Mathod(ref Type type, int flags);

Anyone has any experience with j# and know how to send references to a method (or define a type in a method as a reference)

  • 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-27T06:09:16+00:00Added an answer on May 27, 2026 at 6:09 am

    I’m pretty sure that you can’t do this directly.

    Everything is passed by value in real Java, and presumably in J# too.

    In recent versions of Java you can workaround the restriction by using AtomicReference, but I very much doubt that J# is up-to-date enough to support this.

    You could try changing the method signature to accept a single-element Type[] array, and then mutate that array element. This would allow you to achieve a similar outcome to ref. The downside is that you’d need to change the call-site and the method itself to wrap and unwrap the variable in the array. (Although you could create your own custom type to encapsulate the wrapping and unwrapping if it simplifies things.)

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

Sidebar

Related Questions

I wanted to write a function that would take an object and convert it
I wanted to use count() function in ColdFusion Query object. Here is my code
I'm wanted to convert some of my python code to C++ for speed but
So if I wanted to produce a bit of code to convert an flv
Wanted to convert <br/> <br/> <br/> <br/> <br/> into <br/>
Wanted to get some consensus around a UI feature I'm working on right now.
Wanted to know if someone had a suggestion on code or maybe there's a
Just wanted to get an idea for ways (web) developers get round the short
I have a VB application. Clients wanted to convert that to a .net application.
I made a Python function to convert dictionaries to formatted strings. My goal was

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.