Table Designing:
TempId TempName Message
1 Fees Dear * your * is pending amount
Front end selected value in "*" D
How to this text in "*" only get it different value replace the data.
I want This result :
Dear John your 25000 is started pending amount

VulpesPosted Sep 9, 2014, 10:33 AM
using System.Text.RegularExpressions;
// ...
The output, as expected, is:
Dear John your 25000 is pending amount
Nirmal KumarCPosted Sep 10, 2014, 4:14 AM
Your information very helpful sir.
Thank you sir.
Nirmal KumarCPosted Sep 10, 2014, 4:14 AM
Your information very helpful sir.
Thank you sir.
Jignesh TrivediPosted Sep 10, 2014, 12:48 AM
Hi,
We can also use string.format function but for that we have to change in in input string...
string message = "Dear {0} your {1} is pending amount";
string[] replacements = {"John", "25000"};
string newstring = String.Format(message,replacements);
hope this will help you.
VulpesPosted Sep 9, 2014, 11:37 AM
You could still do it using:
message.IndexOf('*', startIndex)
to get successive positions of the asterisks but regular expressions are neater :)
Nitesh KejriwalPosted Sep 9, 2014, 10:43 AM
Nitesh KejriwalPosted Sep 9, 2014, 10:06 AM