It's well known that IDictionary collections present run-time exceptions if
you attempt to serialize them across Web service boundaries.
I need transfer data from this struct:
private struct OnlineRecordDat a
{
public string WITS;
public float Value;
....
}
I use this technic to transfer data:
[WebMethod]
public List<stringOnli neRecord()
{
// data sample
OnlineRecordDat a[] a = new OnlineRecordDat a[100];
// populate a[] from database...
List<stringr = new List<string>();
for (int i = 0; i <= a.GetUpperBound (0); i++)
{
r.Add(a[i].WITS + "=" + a[i].Value.ToString ("E"));
}
return r;
}
My question is: Is there is some way to write this more efficient code? ...
I need the best speed
Thanks in advanced,
<Harvey Triana />
you attempt to serialize them across Web service boundaries.
I need transfer data from this struct:
private struct OnlineRecordDat a
{
public string WITS;
public float Value;
....
}
I use this technic to transfer data:
[WebMethod]
public List<stringOnli neRecord()
{
// data sample
OnlineRecordDat a[] a = new OnlineRecordDat a[100];
// populate a[] from database...
List<stringr = new List<string>();
for (int i = 0; i <= a.GetUpperBound (0); i++)
{
r.Add(a[i].WITS + "=" + a[i].Value.ToString ("E"));
}
return r;
}
My question is: Is there is some way to write this more efficient code? ...
I need the best speed
Thanks in advanced,
<Harvey Triana />
Comment