08-05-2011 08:54 AM
I'm trying to convert a cluster to a .NET object. I know you can't do it directly, so I tried flattening the cluster to a string and creating a .NET object out of the flattened string. This is not working either. The flattened string will contain some unprintable characters and it appears that the returned string is truncated at the first unprintable character. Is there a workaround for this? Maybe if the string is converted to a byte array first?
TIA,
Bill F
Solved! Go to Solution.
08-05-2011 09:04 AM
There really isn't a way of doing this directly. What's the .NET object that you are trying to cast to? Are you trying to cast it to a struct? If so, just call the constructor for the struct and then populate the members via property nodes. Then you can pass the struct object to the method/property that you are trying to call.
08-05-2011 01:51 PM
I'm not trying to cast to a particulr .NET object. I just want to box it to use a .Net collection class - a Hashtable in this case. Turns out that converting the flattened string to a byte array worked. I guess you could use this technique for any .Net collection class - pretty powerful.
Bill F
06-05-2012 01:59 PM
Bill F
Can you post an example? I'm trying to do the same thing.