I have a code which loop in 2 table and collect string if any exception thrown, ever time when another exception thrown the 1 message get deleted and am using list object, how to add multi string in list and send to view?
- foreach ( dicionary d in hashtable1)
- {
- writer = xmlwriter.create()
- string strmsg = "";
- message = new List<string>
- try
- {
- some condition
- }
- catch( excep ex)
- {
- message.add(strmsg);
- }
- }
- foreach ( dicionary d in hashtable2)
- {
- string strmsg2 = "";
- message2 = new List<string>
- try
- {
- some condition
- }
- catch( excep ex)
- {
- message2.add(strmsg2);
- }
- }
- writer.Flush();
- writer.Close();
Comments
Post a Comment