var1 = "Acc_det(acc_code)";
how will get value from Acc_det(acc_code) using var1 ?
var1 = "Acc_det(acc_code)";
how will get value from Acc_det(acc_code) using var1 ?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question.
Praveen KumarPosted Aug 11, 2025, 4:39 AM
In C# (including .NET MAUI), if you have:
and you want to extract the value inside the parentheses (acc_code in this example), you can use a regular expression or string parsing.
Option 1 – Using Regex
Option 2 – Using String Methods
? When to use which?
Regex → cleaner for patterns, even if string format changes slightly.
String Methods → faster and fine for simple cases like this.