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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T22:31:22+00:00 2026-05-17T22:31:22+00:00

I have a .NET class library that I wrote in C++. public ref class

  • 0

I have a .NET class library that I wrote in C++. “public ref class MyClass” defines a method “MyMethod” that takes two System::Int32 parameters.

Here is MyClass first then my question:

namespace MyNetAssembly {    
    public ref class MyClassThatDoesStuff
    {
    public:
        MyClassThatDoesStuff();

        void MyMethod(System::Int32^ number1, System::Int32^ number2);
        property System::Int32 MyProperty{
            int get (){
                return *_result;
            }

            void set(System::Int32 value){
            }
        }
    private:
        int^ _result;
    };
}

Here is the cpp code:

MyNetAssembly::MyClassThatDoesStuff::MyClassThatDoesStuff()
{
    *_result = 0;
}

void MyNetAssembly::MyClassThatDoesStuff::MyMethod(System::Int32^ number1, System::Int32^ number2)
{
    *_result =(*number1 + *number2) * 100;
}

When I load this assembly from LabView 8.5 using “Constructor Node” vi. Then, I try to invoke MyMethod() using an “Invoke Method” vi, I get the parameters to the method to be of “ValuteType” and not “Int32” as I expect to use directly with LabView constants and controls. Rather, when I create a constant by right clicking on the connector for the parameter, I get “.NET Object”!

Please, How can I get LabView to recognize parameter types?

Note: I tried to change parameters from System::Int32^ number1 to System::Int32 number1. That did not help either.

  • 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-17T22:31:22+00:00Added an answer on May 17, 2026 at 10:31 pm

    I think I figured it out! Apparently, there is something funny happens within the vi file itself. If there is a .NET Constructor Node with an assembly defined, then rebuilding the assembly in Visual Studio and updating the Constructor Node does not have an effect over imported method signatures. Therefore, MyMethod(System::Int32 number1, System::Int32 number2, System::String^ str) was no were to be seen.

    So, what worked for me is the following:

    1. I deleted *Constructor Node* and *Invoke Node* from vi, then saved.
    2. To pass integer values to MyMethode here is the method definition that worked for me:
      MyMethod(System::Int32 number1, System::Int32 number2, System::String^ str)
      

      I think the “ValueType” term I saw in LabView means that it requires a value type for Int32.

    It can be confusing when LabView have you under the impression that it has completely updated itself when you rebuild your .NET Assembly.

    Thanks to everyone who helped. I hope my answer is helpful to anyone else who is working with .NET and LabView.

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

Sidebar

Related Questions

I have a .NET class library containing a class with a method that performs
I have an ASP.NET VB.NET web project that references a VB.NET class library. I
I have a class library that I have written in C#.net. I want to
I have created a VB.NET Class Library that exposes some COM Interop sub routines.
I have a .NET class library that spins up a secondary process which is
I have a C# (2008/.NET 3.5) class library assembly that supports WPF (based on
I have a class library (.NET) with a reference to a web service (in
If I have a .Net class that is not part of any namespace then
How can I invoke overloaded generic method in IronRuby? I have a .NET class
I have the following .Net class: public class Product { public int ID {get;set;}

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.