Re: copy SortedList

Tech-Archive recommends: Fix windows errors by optimizing your registry



Don't think so but someone may have another way .. I have added an extension
method to mine for this.

Cheers,

Greg
<aeshiels@xxxxxxxxx> wrote in message
news:1160392709.673450.173570@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Thanks Greg. Ill try that.

Is there another method of copying a SortedList without having to pass
the list via the constructor?

Thanks
Andy



Greg Young wrote:
Since you are just creating a clone of the first I would probably use
http://msdn2.microsoft.com/en-us/library/ms132324.aspx

SortedList<CUser, CUser> userList2 = new SortedList<CUser,
CUser>(userList1);

Cheers,

Greg

<aeshiels@xxxxxxxxx> wrote in message
news:1160390047.467788.309270@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hello,

I have a SortedList defined as...

SortedList<CUser, CUser> userList = new SortedList<CUser,
CUser>();

...and which to copy it to another sorted list

SortedList<CUser, CUser> userList2 = new SortedList<CUser,
CUser>();

What is the easiest way to do this without iterating through the list
and copying each indiviual item to the new array?

Im a C++ developer and use stl::copy to copy my vectors etc. and was
wondering anything similar in C# (ive had a look on google but didnt
find anything as yet).

Any help would be appreciated. Thanks

Andy.S




.



Relevant Pages

  • Re: When youre buried in books
    ... Fair use allows copying of portions of a copyrighted work for the purposes of criticism, comment, news reporting, teaching, scholarship, or research. ... Even if Google only intends to display small portions of the copyrighted works, ... For me, as a writer, fair use would be the freedom to quote from published works without having to count the words, or worry that I was exceeding some arbitrary limit tacitly agreed upon by some, but not all, publishers. ...
    (rec.collecting.books)
  • Re: DBF WITH EXTENSION OTHER THAN .DBF ( I.E. DAT )
    ... > I read in MSDN about Jet 4.0, It is saying that with the previous version ... it is allowed to read dbase file with extension other than .dbf ... > I have to read .dat as it is w/o renaming the file due to it might be used ... > rather than copying the file. ...
    (borland.public.delphi.database.ado)
  • Re: When youre buried in books
    ... so I'll continue to use Google for most of my news ... Google is over the edge with scanning copyrighted works. ... Their stance that "publishers should want us to" looses all credibility ... Fair use allows copying of portions of a copyrighted work ...
    (rec.collecting.books)
  • Re: Damn address info
    ... Michelle Steiner wrote: ... > I can't get google to recognize that string. ... It definitely works better when I select the entire URL before copying it. ...
    (comp.sys.mac.system)
  • rip dvd to hard drive
    ... What recommended methods are there for copying a dvd video to the hard ... Google searches don't yield anything or at least anything that makes sense ...
    (Ubuntu)