Re: I can't extract string data from a type object

From: Jon Skeet [C# MVP] (skeet_at_pobox.com)
Date: 07/20/04


Date: Tue, 20 Jul 2004 14:57:45 +0100

Chris <anonymous@discussions.microsoft.com> wrote:
> I am calling a COM object that returns a type Object and
> it contains two strings but I can't get them out. Here is
> the command:
>
> object ParamNameObj= localxPCCOMOBJ.xPCTarget.GetParamName
> (1);
>
> ParamNameObj shows up as a System.Array in the watch window
> with the following elements.
> -[0] datastr1 as string
> -[1] datastr2 as string
>
> But I can't get the data. I've tried .ToString object
> method and it gives me "System.Array" I've tried to
> reference the object as an array but it tells me that the
> object is variable and not a method.

Could you show *how* you've tried to use it as an array?

-- 
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too


Relevant Pages

  • Re: K&R2 Secition 5.9 - major blunders
    ... Each element of b doesn't point to a 20 element array of int. ... This mistake is crucial because ... my explanation is really the qualities of something else: ... > The use of the array of pointers is to store the strings. ...
    (comp.lang.c)
  • Re: K&R2 Secition 5.9 - major blunders
    ... Each element of b doesn't point to a 20 element array of int. ... This mistake is crucial because ... my explanation is really the qualities of something else: ... > The use of the array of pointers is to store the strings. ...
    (comp.lang.c)
  • Re: Returning array of strings through callback from unmanaged to
    ... Is the array of strings a jagged array or fixed length array? ... It is imperative that I am able to return the array of strings from the ... I have control over how many strings I want the unmanaged code to return ... What I want to accomplish is to pass a callback function to unmanaged ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: attempting to return values from array from w/in a function
    ... What I get is an array w/ only the most recent array entry. ... I am new to PHP & do not have formal scripting ... you end up comparing strings, but the test you mean probably is simply: ... case 1: {codeblock} ...
    (comp.lang.php)
  • Re: K&R2 Secition 5.9 - major blunders
    ... Would changing 'point to a' to 'point into a' twenty element array be ... > arrays of pointers is to store character strings of diverse ... comparison between what was really happening (arrays of pointers to ... pointer to a string(this probably would confuse beginners)" and ...
    (comp.lang.c)