I am using the following code:
var valuesWithNames = from value in values1
select new {
Value = (int)value.ToString("00"),
Text = value.ToString()
};
How I can I change this to use the new Linq syntax and also
change it so that the Text that I return has the following
Regex applied to it ?
".Select(n => Regex.Replace(n, "([A-Z])", " $1").Trim());"
Is equivalent to:
You can initialise Text with any expression that returns a
string, so for your regex you should just be able to use: