Robson Amaral

Robson Amaral

  • NA
  • 132
  • 15.7k

Questions with the message log for the user

Apr 12 2018 8:06 AM
When sending a log to the user, the message appears with the line name along with the numeral, how can I separate and keep the message: Cell B for line 1 and / or cell C for line 1 must be filled.
However, the following log is displayed:
Cell B for line1 and / or cell C for line 1 must be filled. How could I be solving this? follow my code.
  1. privatevoidPreliminaryVerification (IEnumerable data)
  2. {
  3. int i = 0;
  4. bool imported = falso ;
  5. foreach (var line in data)
  6. {
  7. i = i + 1;
  8. // Valida se pelo menos uma das colunas NumProcess estiver preenchida
  9. if (line.ItemArray [1] .ToString () == "" && line.ItemArray [2] .ToString () == "" )
  10. {
  11. // My problem here is that by showing the log, instead of showing line 1, it shows // line1. Could someone please help me?
  12. log.Append ( "The B cell" + (i) + "and / or C cell" + (i) + "must be completed.
    "
    );
  13. fileInvalidated = true ;
  14. }
  15. }

Answers (3)