Click here to Skip to main content
15,891,136 members
Home / Discussions / C#
   

C#

 
GeneralRe: getting substring from a string Pin
Ankit Aneja8-Jun-07 1:44
Ankit Aneja8-Jun-07 1:44 
GeneralRe: getting substring from a string Pin
Manas Bhardwaj8-Jun-07 1:48
professionalManas Bhardwaj8-Jun-07 1:48 
GeneralRe: getting substring from a string Pin
Ankit Aneja8-Jun-07 2:18
Ankit Aneja8-Jun-07 2:18 
GeneralRe: getting substring from a string Pin
Manas Bhardwaj8-Jun-07 2:21
professionalManas Bhardwaj8-Jun-07 2:21 
GeneralRe: getting substring from a string Pin
Ankit Aneja8-Jun-07 2:33
Ankit Aneja8-Jun-07 2:33 
GeneralRe: getting substring from a string Pin
Manas Bhardwaj8-Jun-07 2:39
professionalManas Bhardwaj8-Jun-07 2:39 
GeneralRe: getting substring from a string Pin
Ankit Aneja8-Jun-07 2:48
Ankit Aneja8-Jun-07 2:48 
GeneralRe: getting substring from a string Pin
Manas Bhardwaj8-Jun-07 3:00
professionalManas Bhardwaj8-Jun-07 3:00 
Here it is:
try<br />
            {<br />
                string newLine = "M|2696|0|D|I|20070604-19:31:25.177|255|8=FIX.4.29=23235=D34=269649=Qa-QTIP-Sim-A56=Qa-QTIP-Sim-A-Internal52=20070604-23:31:2540=1MDSNAPID=6071=511=Q8BO7023-121=4955=QQQQ59=05011=12463/2007-06-04-07:3138=100109=RajTest5012=Raj9040=NSTRATEGY=PassThru54=147=A100=ARCA10=169|0|\r";<br />
                String fixString = newLine;<br />
                string[] fixArray = fixString.Split(Convert.ToChar(1));<br />
                //I used 1 because FIX message uses this as delimiter...<br />
                Hashtable fixTable = new Hashtable();<br />
                string[] fieldArray = null;<br />
                try<br />
                {<br />
                    for (int fieldCount = 0; fieldCount < fixArray.Length; fieldCount++)<br />
                    {<br />
                        fieldArray = fixArray[fieldCount].Split('=');<br />
                        fixTable.Add(fieldArray[0].ToString(), fieldArray[1].ToString());<br />
                    }<br />
                }<br />
                catch<br />
                {      <br />
                  <br />
                }<br />
                string firstTagString = fixTable["100"].ToString();<br />
                MessageBox.Show(firstTagString);<br />
<br />
            }<br />
            catch (Exception ex)<br />
            {<br />
                MessageBox.Show(ex.Message);<br />
            }

Let me know if this works...
GeneralRe: getting substring from a string Pin
Ankit Aneja8-Jun-07 3:25
Ankit Aneja8-Jun-07 3:25 
GeneralRe: getting substring from a string Pin
Manas Bhardwaj8-Jun-07 3:28
professionalManas Bhardwaj8-Jun-07 3:28 
GeneralRe: getting substring from a string Pin
Ankit Aneja8-Jun-07 5:04
Ankit Aneja8-Jun-07 5:04 
QuestionInsert in Oracle Pin
Walaza8-Jun-07 0:26
Walaza8-Jun-07 0:26 
AnswerRe: Insert in Oracle Pin
Colin Angus Mackay8-Jun-07 0:36
Colin Angus Mackay8-Jun-07 0:36 
GeneralRe: Insert in Oracle Pin
Walaza8-Jun-07 0:46
Walaza8-Jun-07 0:46 
AnswerRe: Insert in Oracle Pin
Colin Angus Mackay8-Jun-07 0:53
Colin Angus Mackay8-Jun-07 0:53 
QuestionPassing Objects to threads.. Pin
Eytukan8-Jun-07 0:20
Eytukan8-Jun-07 0:20 
AnswerRe: Passing Objects to threads.. Pin
Manas Bhardwaj8-Jun-07 0:24
professionalManas Bhardwaj8-Jun-07 0:24 
GeneralRe: Passing Objects to threads.. Pin
Colin Angus Mackay8-Jun-07 0:34
Colin Angus Mackay8-Jun-07 0:34 
GeneralRe: Passing Objects to threads.. Pin
Manas Bhardwaj8-Jun-07 0:50
professionalManas Bhardwaj8-Jun-07 0:50 
GeneralRe: Passing Objects to threads.. Pin
Colin Angus Mackay8-Jun-07 0:55
Colin Angus Mackay8-Jun-07 0:55 
GeneralRe: Passing Objects to threads.. Pin
Manas Bhardwaj8-Jun-07 1:03
professionalManas Bhardwaj8-Jun-07 1:03 
GeneralRe: Passing Objects to threads.. Pin
AikinX8-Jun-07 0:55
AikinX8-Jun-07 0:55 
AnswerRe: Passing Objects to threads.. Pin
andre_swnpl8-Jun-07 1:37
andre_swnpl8-Jun-07 1:37 
Questionconvert this cyrillic output from the console app to unicode [modified] Pin
drweb868-Jun-07 0:00
drweb868-Jun-07 0:00 
AnswerRe: convert this cyrillic output from the console app to unicode Pin
PandemoniumPasha8-Jun-07 0:17
PandemoniumPasha8-Jun-07 0:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.