1. Check the list
contains[
^] the string
2. If it does, then
Remove[
^] it.
You will need to move your code around a bit so that
Vnumber
,
VDate
etc are
in scope [
^]for the
else
block
As an aside, as you have gone to all the effort of using
string str = VNumber + "~" + VDate;
why not use it?
objDocumentList.Add(str);