can't convert object to string to show it in textfield !

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Hi,

I searched a lot of on internet but I still can not convert my object to string to view the chosen index in textfield :(
this is my screenshot on watch you can see the object and the value,.. how can I convert the object to view the customer name on index [2] in textfield for example ??

<pre class="prettyprint WebApplication1.srv042.FilterItem Test = new WebApplication1.srv042.FilterItem();
<span class="x_Apple-tab-span" style="white-space:pre Test.Name = "Nummer";
Test.Filter = "2510306";
objects = service.GetDataFiltered("Klant", "", new WebApplication1.srv042.FilterItem[] { Test }, 1, 1);
//txtCustName.Text = Convert.ToString(objects[2]);
//txtCustName.Text =objects[2].ToString();
//string[] cust = objects[2].Cast<string>().ToArray();
//string[] cust = (string[])objects[2];
[/code]
<br/>

<pre class="prettyprint - objects {object[1][]} <span class="x_Apple-tab-span" style="white-space:pre object[][]
- [0] {object[6]} <span class="x_Apple-tab-span" style="white-space:pre object[]
[0] "Customer: 2510306" object {string}
[1] "2510306" <span class="x_Apple-tab-span" style="white-space:pre object {string}
[2] "J VAN PUFFELEN" object {string}
[3] "MALUSSTR 8 A" <span class="x_Apple-tab-span" style="white-space:pre object {string}
[4] "BORCULO" <span class="x_Apple-tab-span" style="white-space:pre object {string}
[5] "7271HV" <span class="x_Apple-tab-span" style="white-space:pre object {string}
[/code]
<br/>
<br/>


View the full article
 
Back
Top