Re: Duplicate dates
From: Dummy Here (dumbass_at_keepthespam.com)
Date: 10/29/04
- Next message: cmc: "Programmatically Created DataGrid Edit Style"
- Previous message: ALI-R: "Re: select and update using ADO.NET"
- In reply to: Trond: "Duplicate dates"
- Next in thread: Trond: "Re: Duplicate dates"
- Reply: Trond: "Re: Duplicate dates"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 29 Oct 2004 19:03:19 -0400
Why not check the array first before inserting a duplicate? If you are
using a hashtable you can use the .Contains() method to see if the item is
already there.
Trond wrote:
> I have been trying to fig out how to build up an array with dates. When
> its generated i want to be able to remove duplicate dates. The dates is
> generated by FileInfo object that is scanning a folder for files.
> Here is some code for that. In this case i am only using a variable not an
> array.
>
> _info = new FileInfo(_fileName);
> base.Text = _info.LastWriteTime.ToShortDateString();
>
> As i see it i must first generate the array with dates. Then create
> another array an put the values from array 1 into it one by one. I tested
> with StringCollection object. But i'm stuck. I kant fig out how to do it.
> Are there someone that have some code that can show me how to remove
> duplicate dates from my array?
>
> Best regards
> Trond
- Next message: cmc: "Programmatically Created DataGrid Edit Style"
- Previous message: ALI-R: "Re: select and update using ADO.NET"
- In reply to: Trond: "Duplicate dates"
- Next in thread: Trond: "Re: Duplicate dates"
- Reply: Trond: "Re: Duplicate dates"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|