Re: [Quickfix-developers] Iterate through message fields?
Brought to you by:
orenmnero
|
From: Alexis M. <ale...@ya...> - 2008-08-29 18:57:53
|
Thanks Oren - though I'm getting an exception doing the below. Right now I'm trying something simple like:
QuickFix.Message fixMsg = new Message(line);
foreach (QuickFix.StringField sf in fixMsg.GetEnumerator())
{
Console.WriteLine(sf.ToString());
}
Getting an exception when compiling:
"foreach statement cannot operate on variables of type 'System.Collections.IEnumerator' because 'System.Collections.IEnumerator' does not contain a public definition for 'GetEnumerator'"
Regards,
Alexis
----- Original Message ----
From: "or...@qu..." <or...@qu...>
To: Alexis Michaelides <ale...@ya...>
Cc: qui...@li...
Sent: Friday, August 29, 2008 5:39:52 PM
Subject: RE: [Quickfix-developers] Iterate through message fields?
Yes.
foreach( StringField field in message.GetEnumerator() )
When you iterate everything is given to you as a string field, if you
need it in another format you wil need to convert it.
--oren
> -------- Original Message --------
> Subject: [Quickfix-developers] Iterate through message fields?
> From: Alexis Michaelides <ale...@ya...>
> Date: Tue, August 19, 2008 5:47 am
> To: qui...@li...
> QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/index.html
> QuickFIX Support: http://www.quickfixengine.org/services.html<hr>In .NET is there any way to iterate through all the fields of a QuickFix message? e.g. using foreach?
> Thanks,
> Alexis<hr>-------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/<hr>_______________________________________________
> Quickfix-developers mailing list
> Qui...@li...
> https://lists.sourceforge.net/lists/listinfo/quickfix-developers
|