Working with array in dotNET
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2014
04:18 PM
08-21-2014
04:18 PM
Working with array in dotNET
Hello,
I have problem with object XXX that i get from dotNET CLR BRIDGE.
It has a property that accep System.String[]
Example: xxx["ChildId"]
So how can i set the value to that property.
I tried: xxx["ChildId"] = {"Alice","Dominate"} , but not success
Please help me.
--
Regards,
MinhT
I have problem with object XXX that i get from dotNET CLR BRIDGE.
It has a property that accep System.String[]
Example: xxx["ChildId"]
So how can i set the value to that property.
I tried: xxx["ChildId"] = {"Alice","Dominate"} , but not success
Please help me.
--
Regards,
MinhT
3 REPLIES 3
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2014
07:31 PM
08-21-2014
07:31 PM
Hi MinhT,
Try one of these:
Create a .NET array by splitting a string by whitespace:
Helen Kosova
SmartBear Documentation Team Lead
________________________
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Try one of these:
Create a .NET array by splitting a string by whitespace:
Create an array and set values dynamically:var arr = dotNET.System.Array.CreateInstance(dotNET.System.String.Empty.GetType(), 2 /* length */);
arr.SetValue("Alice", 0);
arr.SetValue("Dominate", 1);
Helen Kosova
SmartBear Documentation Team Lead
________________________
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2014
07:40 PM
08-21-2014
07:40 PM
Hello Helen Kosova,
The first is error. But the second works. You save my day.
--
Thanks a lot,
MinhT
The first is error. But the second works. You save my day.
--
Thanks a lot,
MinhT
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2014
03:21 AM
08-22-2014
03:21 AM
I don't know, just do both and only the second works.
