Search results for query: *

  1. B

    Shadow the constructor method from another class

    i have two classes.. equipment and turbine in the equipment class, i have a constructor method that takes as arguments the date of purchase (date), and equipment OEM number, equipment serial number, and equipment type (all strings) and uses those values to initialize the instance arguments. It...
  2. B

    pick numbers from a string

    Hi, I am interested to know, how can i change my code to the one which u said... Dim result as String = System.Text.RegularExpressions.Regex.Replace(input, "(\\d+)", "0.0#$1") As a beginner, i couldnt understand how to make it.... Dim abc As Array abc = contents.Split(",") Dim z As...
  3. B

    pick numbers from a string

    I have changed accordingly now, as u said... Dim abc As Array abc = contents.Split(",") Dim z As Integer For z = 0 To UBound(abc) - 1 Dim dummy As Integer If Integer.TryParse(abc(z), dummy) = True Then If dummy > 0 Then abc(z) = String.Concat("0.0", abc(z)) Else dummy = Math.Abs(dummy)...
  4. B

    pick numbers from a string

    I reached, what i wanted.... finally.. i did that.... Dim contents AsString = "head,1,2,hands,5,fingers,9,stars,-2,debts,-10,subtract" Dim abc As Array abc = contents.Split(",") Dim z, hold As Integer For z = 0 To UBound(abc) - 1 If Integer.TryParse(abc(z), 1) = True Then hold = CInt(abc(z))...
  5. B

    pick numbers from a string

    Hi... thank u so much for ur help.... now it works fine.. after changing like this... Dim contents AsString = "head,1,2,hands,5,fingers,9,stars" Dim abc As Array abc = contents.Split(",") Dim z As Integer For z = 0 To UBound(abc) - 1 If Integer.TryParse(abc(z), 1) = True Then abc(z) =...
  6. B

    pick numbers from a string

    Dim abc As Array abc = contents.Split(",") Dim z As Integer For z = 0 To UBound(abc) - 1 If Integer.TryParse(abc(z)) = True Then ' i changed here as integer.tryparse(abc(z)) instead of abc().. abc(z) = String.Concat("0.0#", abc(z)) Else End If Next contents = String.Join(",", abc()) Though i...
  7. B

    pick numbers from a string

    This is the code i wrote as u said... Dim contents As String = "head,1,2,hands,5,fingers,9,stars" Dim abc As Array abc = contents.Split(",") Dim z As Integer For z = 0 To UBound(abc) - 1 If Integer.TryParse(abc()) = True Then Dim test As String = abc(z) test = String.Concat("0.0#", test) abc(z)...
  8. B

    pick numbers from a string

    Hi Friends, Suppose, if string is Dim str as String = "2 hand 10 fingers 1 head" I would like to print the sentence as "0.0#2 hand 0.01#0 finger 0.0#1 head" ie each number in string should be replaced as 0.0#number Can anybody help me with this... ? Thanks! Basky
Back
Top