M
Morten
Hi!
I've created a web service that sends an array of custom objects to the
client. My object is defined with 2 public properties. When I receive the
XML on the client and instantiate my objects these properties are apparently
fields (I don't know the difference but this is what I've read). This means
that I can't bind the array of objects to a datagrid. Is it possible to
convert the fields into properties on the client? If so could someone please
provide an example that shows how this is done?
Help is appreciated.
Morten
My class definition looks like this:
public class SiteClass
{
private string sitename;
public string Sitename
{
get
{
return sitename;
}
set
{
sitename = value;
}
}
private StringCollection hostheaders;
public StringCollection Hostheaders
{
get
{
return hostheaders;
}
set
{
hostheaders = value;
}
}
}
I've created a web service that sends an array of custom objects to the
client. My object is defined with 2 public properties. When I receive the
XML on the client and instantiate my objects these properties are apparently
fields (I don't know the difference but this is what I've read). This means
that I can't bind the array of objects to a datagrid. Is it possible to
convert the fields into properties on the client? If so could someone please
provide an example that shows how this is done?
Help is appreciated.
Morten
My class definition looks like this:
public class SiteClass
{
private string sitename;
public string Sitename
{
get
{
return sitename;
}
set
{
sitename = value;
}
}
private StringCollection hostheaders;
public StringCollection Hostheaders
{
get
{
return hostheaders;
}
set
{
hostheaders = value;
}
}
}