Click here to Skip to main content
15,881,380 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionClick Once Deployment Pin
Member 471821410-Apr-08 23:56
Member 471821410-Apr-08 23:56 
AnswerRe: Click Once Deployment Pin
Mycroft Holmes11-Apr-08 14:42
professionalMycroft Holmes11-Apr-08 14:42 
QuestionWhich delimiter i have used while parsing a string with multiple delimeters? Pin
BooleanTrue10-Apr-08 23:43
professionalBooleanTrue10-Apr-08 23:43 
AnswerRe: Which delimiter i have used while parsing a string with multiple delimeters? Pin
Herl the Pearl11-Apr-08 0:02
Herl the Pearl11-Apr-08 0:02 
GeneralRe: Which delimiter i have used while parsing a string with multiple delimeters? Pin
BooleanTrue11-Apr-08 0:19
professionalBooleanTrue11-Apr-08 0:19 
GeneralRe: Which delimiter i have used while parsing a string with multiple delimeters? Pin
Herl the Pearl11-Apr-08 0:50
Herl the Pearl11-Apr-08 0:50 
GeneralRe: Which delimiter i have used while parsing a string with multiple delimeters? Pin
BooleanTrue11-Apr-08 1:11
professionalBooleanTrue11-Apr-08 1:11 
AnswerRe: Which delimiter i have used while parsing a string with multiple delimeters? Pin
Herl the Pearl11-Apr-08 2:32
Herl the Pearl11-Apr-08 2:32 
OK, this is something I have needed to do myself, so I created a little example code... Hope it helsp you:

<br />
        Dim strSrc As String = "aF00000000000000000000000000000AAABB8500FFFFFFFFDa000000000000000000000000000000666567400FFFFFFFFDbF000000000000000000000000000008AABAA700FFFFFFFFDbF0000000000000000000000000000079AAA9800FFFFFFFFCaF00000000000000000000000000000A98BA9700FFFFFFFFCb000000000000000000000000000000EEEFFEE00FFFFFFFFBa000000000000000000000000000000EEFFFFF00FFFFFFFFCbF00000000000000000000000000000EEEEFED00FFFFFFFFCa000000000000000000000000000000BCDDEDA00FFFFFFFFDbF00000000000000000000000000000BDEDDDA00FFFFFFFFCb000000000000000000000000000000666654400FFFFFFFFD"<br />
<br />
        '   LOGIC:<br />
        '       First we replace the delimiters 'a' and 'b' with '*a' and '*b' <br />
        '       to get a single string array from the source string.<br />
        '       <br />
        '       We then run through the single array and assign the individual <br />
        '       items to their own string array; arrA and arrB.<br />
<br />
        Dim strBuild As New System.Text.StringBuilder()<br />
        strBuild.Append(strSrc)<br />
        strBuild.Replace("a", "*a")<br />
        strBuild.Replace("b", "*b")<br />
        Debug.Print(strBuild.ToString)<br />
<br />
        '   GETTING A SINGLE ARRAY:<br />
        '       Here, we split the source string into an array using the <br />
        '       asterisk (the '*' character) as the delimiter. This ensures <br />
        '       that we retain the 'a' and 'b' characters, which we will need <br />
        '       later on.<br />
<br />
        Dim arrTemp As String()<br />
        arrTemp = strBuild.ToString.Split("*")<br />
<br />
        '   BUILDING NEW ARRAYS:<br />
        '       We can now use the temporary array to build two new arrays. To <br />
        '       do so, we loop through the items and examine the leftmost <br />
        '       character. If that be 'a' then we assign the item to the <br />
        '       A-array; be it 'b' then we assing it to the B-array instead.<br />
<br />
        Dim arrA As New ArrayList<br />
        Dim arrB As New ArrayList<br />
<br />
        For Each curStrItem As String In arrTemp<br />
            If curStrItem.Length > 0 Then<br />
                Select Case curStrItem.Substring(0, 1)<br />
                    Case "a"<br />
                        arrA.Add(curStrItem.Substring(1))<br />
<br />
                    Case "b"<br />
                        arrB.Add(curStrItem.Substring(1))<br />
<br />
                    Case Else<br />
                        '<br />
                        '   OOPS, something weird ... we ignore this item.<br />
                        '<br />
                End Select<br />
            End If<br />
        Next<br />
<br />
        '   DONE:<br />
        '       The arrA array-list now contains all the 'a' items and the <br />
        '       arrB array-list now contains all the 'b' items. When you get <br />
        '       here, you should probably deallocate variables, etc.<br />
<br />
        Debug.Print("A-items:")<br />
        For Each curItem As String In arrA<br />
            Debug.Print(curItem)<br />
        Next<br />
<br />
        Debug.Print("---" & vbCrLf & "B-items:")<br />
<br />
        For Each curItem As String In arrB<br />
            Debug.Print(curItem)<br />
        Next<br />
<br />
        Debug.Print("--- END ---")<br />


Ask not whether it is useful. Ask what it is useful for.

GeneralRe: Which delimiter i have used while parsing a string with multiple delimeters? Pin
BooleanTrue11-Apr-08 2:58
professionalBooleanTrue11-Apr-08 2:58 
GeneralRe: Which delimiter i have used while parsing a string with multiple delimeters? Pin
Herl the Pearl11-Apr-08 3:08
Herl the Pearl11-Apr-08 3:08 
Generaluse vb.net to develop web based application Pin
shee_dee8610-Apr-08 22:50
shee_dee8610-Apr-08 22:50 
GeneralRe: use vb.net to develop web based application Pin
Christian Graus11-Apr-08 1:45
protectorChristian Graus11-Apr-08 1:45 
GeneralRe: use vb.net to develop web based application Pin
shee_dee8613-Apr-08 15:19
shee_dee8613-Apr-08 15:19 
GeneralRe: use vb.net to develop web based application Pin
Christian Graus13-Apr-08 15:57
protectorChristian Graus13-Apr-08 15:57 
GeneralArray of objects in an array of objects Pin
Mycroft Holmes10-Apr-08 22:26
professionalMycroft Holmes10-Apr-08 22:26 
GeneralRe: Array of objects in an array of objects Pin
Christian Graus11-Apr-08 1:45
protectorChristian Graus11-Apr-08 1:45 
GeneralRe: Array of objects in an array of objects - resolved Pin
Mycroft Holmes11-Apr-08 14:39
professionalMycroft Holmes11-Apr-08 14:39 
QuestionSending Extended ASCII values from serial port Pin
kranthikiran.a10-Apr-08 21:13
kranthikiran.a10-Apr-08 21:13 
GeneralRe: Sending Extended ASCII values from serial port Pin
Rajesh Anuhya10-Apr-08 21:48
professionalRajesh Anuhya10-Apr-08 21:48 
QuestionCrystal Report from SP ask Login Password Pin
bharat khandelwal10-Apr-08 19:53
bharat khandelwal10-Apr-08 19:53 
QuestionHow I can check cookies are enable or disable? Pin
Ashish Kumar Vyas10-Apr-08 19:23
Ashish Kumar Vyas10-Apr-08 19:23 
AnswerRe: How I can check cookies are enable or disable? Pin
Christian Graus10-Apr-08 20:03
protectorChristian Graus10-Apr-08 20:03 
GeneralVB.NET form location Pin
Joe Surls10-Apr-08 16:54
Joe Surls10-Apr-08 16:54 
GeneralRe: VB.NET form location Pin
Christian Graus10-Apr-08 17:40
protectorChristian Graus10-Apr-08 17:40 
GeneralRe: VB.NET form location Pin
Joe Surls10-Apr-08 17:52
Joe Surls10-Apr-08 17:52 

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.