IEnumerable<string> peopleWithInvalidAge =
(from age in User
where age < 0
select name ).Distinct();
MessageBox.show("The people who have invalid age are {0}" , string.Join(", ", peopleWithInvalidAge) )
This displays the output as string . But what i want is that the output should be displayed in a tabular form . With Name and age when MessageBox.show is called.
If we can highlight inside message box then also it will be great
Please help.
This is for WPF
For formatting could use Window.
You can pass the IEnumerable in the ctor.
Window.ShowDialog is modal.
Window.ShowDialog Method
Moderator there are three parts to question.
Modal, passing data, and formatting.
The other answer does not address modal or passing data to a Window.
I posted while I was creating the passing and formatting sample.