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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T07:46:09+00:00 2026-06-07T07:46:09+00:00

I have an interesting question regarding C# code. Basically I have to call a

  • 0

I have an interesting question regarding C# code.
Basically I have to call a method

BCI2000AutomationLib.IBCI2000Remote.StartupModules(ref System.Array)

Using Visual Studio 2010 the following code compiles and works perfectly:

// Startup modules
string[] modules = new string[3];
modules[0] = "SignalGenerator --local";
modules[1] = "DummySignalProcessing --local";
modules[2] = "DummyApplication --local";
ok_conn = bci.StartupModules(ref modules);

Now porting this to a game engine (e.g. Unity 3D) requires some stricter C# code since it uses Mono C# compiler. So for the same code i get the following compilation error:

The best overloaded method match for
‘BCI2000AutomationLib.IBCI2000Remote.StartupModules(ref System.Array)’ has some invalid arguments Argument 1: cannot convert
from ‘ref string[]’ to ‘ref System.Array’

Can you please give an advice on how to rewrite this code block to a more strict coding to resolve the stated error?

  • 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-07T07:46:11+00:00Added an answer on June 7, 2026 at 7:46 am

    Change the type of you variable to System.Array

    // Startup modules 
    Array modules = new string[3] 
    {
        "SignalGenerator --local",
        "DummySignalProcessing --local",
        "DummyApplication --local"
    };
    ok_conn = bci.StartupModules(ref modules); 
    

    Your method StartupModules takes a ref Array as argument ; it can set the variable to any other Array. Not necessarily a string Array, it could be an int[]. That’s why you cannot call with a variable typed as Array of string.

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

Sidebar

Related Questions

I have an interesting question on initialization. I have the following code: public class
So I have an interesting design question regarding an app I'm developing for the
I have interesting question. According to MSDN yield syntax : yield return <expression>; //
I have a interesting question: I want to split the year into 4 quarters.
I have an interesting question about interface builder and ARC. I am building a
An interesting question arose today. Let's say I have a .NET object that implements
I have recently come across an interesting question on strings. Suppose you are given
This a VERY open question. Basically, I have a computing application that launches test
I want to put a question about what ideas do you have regarding Open
Question regarding redirection using htaccess. On a GET search form submit I get the

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.