We're a community of 1.1M IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,080,661 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

How to use my data type in a function

Hi all,

I've created an object array from a managed class.

array<MyDataType_Class^> ^Object = gcnew array <MyDataType_Class^> (3);
Object[1] = gcnew MyDataType_Class;
Object[1]->id = 1;
Object[1]->surnmame = "Foo";
TextBox1->AppendText(ConvertToString(Object[1]->surname)); // Outputs "Foo"

The object works well and outputs expected results. However what i need is :
Calling or using this data type in some other custom functions

P.S Referred class above

public ref class MyDataType_Class // managed class
   
      {
      public:
      int id;
      String ^surnmame; 
      MyDataType_Class() : id(0),surname(""){}
      }

Thanks a lot.

2
Contributors
1
Reply
32 Minutes
Discussion Span
1 Year Ago
Last Updated
2
Views
cangan
Newbie Poster
16 posts since Jan 2012
Reputation Points: 11
Solved Threads: 0
Skill Endorsements: 0

Don't make a Duplicate post

zeroliken
Nearly a Posting Virtuoso
1,346 posts since Nov 2011
Reputation Points: 214
Solved Threads: 206
Skill Endorsements: 15

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page generated in 0.2231 seconds using 2.66MB