Hi guys, hopefully an easy one for you.
I have the following I made in VB.NET but I am trying to learn C# so I would like to see how this can be done.
From looking on the net I have found "System.Text.RegularExpres
sions"
From this I know I can use something like "Regex.Replace(TextString,
"'", "''");"
What I would like to do is wrap this in a function like my example below, any help would be great.
Private Function EncodeIt( ByVal TextString) As String
TextString = Replace(TextString, "'", "''")
Return TextString
End Function
Start Free Trial