Advertisement

05.05.2008 at 07:55AM PDT, ID: 23376560
[x]
Attachment Details

C# Function

Asked by TheJay04 in C# Programming Language

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.RegularExpressions"
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 FunctionStart Free Trial
[+][-]05.05.2008 at 08:09AM PDT, ID: 21500561

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: C# Programming Language
Sign Up Now!
Solution Provided By: angelIII
Participating Experts: 1
Solution Grade: A
 
 
[+][-]05.05.2008 at 08:10AM PDT, ID: 21500568

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628