H
Harvey Triana
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 OnlineRecordData
{
public string WITS;
public float Value;
....
}
I use this technic to transfer data:
[WebMethod]
public List<string> OnlineRecord()
{
// data sample
OnlineRecordData[] a = new OnlineRecordData[100];
// populate a[] from database...
List<string> r = new List<string>();
for (int i = 0; i <= a.GetUpperBound(0); i++)
{
r.Add(a.WITS + "=" + a.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 OnlineRecordData
{
public string WITS;
public float Value;
....
}
I use this technic to transfer data:
[WebMethod]
public List<string> OnlineRecord()
{
// data sample
OnlineRecordData[] a = new OnlineRecordData[100];
// populate a[] from database...
List<string> r = new List<string>();
for (int i = 0; i <= a.GetUpperBound(0); i++)
{
r.Add(a.WITS + "=" + a.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 />