I have converted a VB solution to C# with the help of SharpDevelop. Now i want to replace a number of MsgBox() calls by MessageBox.Show(). Old and new code looks like this:
I want to replace occurrences of the first line by the second line. When i try to generate the pattern via "Find similar code" i get an "pattern is ambigous" error.
When i try to define a pattern myself i get an error "Unexpected token".
When i change the language from C# to VB.NET the error disappears, but R# won't find any occurence of the pattern.
Can anyone tell me how to solve this? There are are around 100 occurrences of this and i don't want to change them manually.
Additionally i tried to fix another error in VB. There are method calls with optional parameters lilke this:
FillVarRec(mvPar, enumTEMPoPar.gkiTEMPoEnde, "TEMPo_ENDE", "", , Datentypen.[String], , , "Bemerkung")
and i want to change to use named parameters like this:
FillVarRec(mvPar, enumTEMPoPar.gkiTEMPoEnde, "TEMPo_ENDE", "", Typ:=Datentypen.[String], Desc:="Bemerkung")
Nevertheless how i define the pattern R# always did'nt find any occurrence (i tried to define the parameters as argument, expression and identifier). Is Search with pattern broken???