Re: Get/Set Property for Array

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Ben Voigt [C++ MVP] wrote:


"Mr. Arnold" <MR. Arnold@xxxxxxxxxx> wrote in message news:OaWdTuJ4JHA.140@xxxxxxxxxxxxxxxxxxxxxxx

"Ben Voigt [C++ MVP]" <rbv@xxxxxxxxxxxxxxxxx> wrote in message news:0B00B080-A3C9-489C-A3EE-81174CCDFE71@xxxxxxxxxxxxxxxx
Here is an example.

private Arraylist _jpmsft = new Arraylist();

What's this Arraylist? Never run into it before. And if you mean System.Collections.ArrayList, that's been dead since Visual Studio 2005.


The ArrayList has been dead since VS 2005, when I just instantiated an ArrayList() object in VS 2008 from the System.Collections?

Just because you don't use something does that make it dead. If I have a need to use an Arraylist, then I going to use one. You may have a different opinion. <G>

It's a fact that you can't get case sensitivity right when your error is pointed out to you, and it's a fact that the generic List<T> is superior to ArrayList in every way I can think of (type safety, performance, removing the broken "threadsafe" wrapper, etc).

So? If I have a needed to use an ArrayList(), I am going to use one.

Sounds good to me. But I have never run into a situation where List<T> couldn't be used and I needed an ArrayList.

So maybe you could give an example of a need to use an ArrayList.



So what if I wanted to bring back two different serialized objects back from a WCF service without making two calls?

The easiest way to do that would be to use and ArrayList that is not type safe as a container to hold both objects and cast them back to their type on the other side..

What if I wanted to have an int that has a count of how many objects there were in the list followed by the objects, then another int telling how many objects followed by its objects, casting back on the other side as I walked the ArrayList(). You can do that with an ArrayList().
.



Relevant Pages

  • Re: Get/Set Property for Array
    ... "Mr. Arnold" wrote in message ... private Arraylist _jpmsft = new Arraylist; ... The ArrayList has been dead since VS 2005, when I just instantiated an ArrayListobject in VS 2008 from the System.Collections? ... It's a fact that you can't get case sensitivity right when your error is pointed out to you, and it's a fact that the generic Listis superior to ArrayList in every way I can think of (type safety, performance, removing the broken "threadsafe" wrapper, etc). ...
    (microsoft.public.dotnet.languages.csharp)
  • Print value of p from the infinite series
    ... But, dead end with weird logic-error. ... It tooks 1688 terms to accomplished the task. ... the `p in int' should yield 3141, but it return 3140 and take another ...
    (comp.lang.java.help)
  • Re: Get/Set Property for Array
    ... Studio 2005. ... The ArrayList has been dead since VS 2005, ... What if I wanted to have an int that has a count of how many objects ... In the first instance you can use a more specific type if for example both ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Thou shalt have no other gods before the ANSI C standard
    ... Hint: I use a version of GCC with 16-bit int every day. ... dead branch, either. ...
    (sci.crypt)
  • Re: Character Constants
    ... Undefined behavior. ... You're dead. ... defined int constant is outside the range of char and an implementation ...
    (comp.lang.c)