Re: IsArray?
Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance
- From: "Jon Skeet [C# MVP]" <skeet@xxxxxxxxx>
- Date: Mon, 28 Apr 2008 05:53:37 -0700 (PDT)
On Apr 28, 1:39 pm, "Paul E Collins" <find_my_real_addr...@xxxxxxx>
wrote:
"Jon Skeet [C# MVP]" <sk...@xxxxxxxxx> wrote:
What exactly do you mean by that? type.IsArray should be fine.
typeof(anything[]).IsArray is true, but typeof(Array).IsArray is false.
As the docs (for IsArray) state: "The Array class returns false
because it is not an array."
Not exactly clear, but my guess is it's because Array is abstract -
you can't have an instance of just Array, and various array-like
things don't make sense for it (such as element type).
Jon
.
Relevant Pages
- Re: [QUIZ] Newbie doubts about the quiz
... I'm going to have this two-dimensional array representing the board. ... but as a flat square. ... behavior of wrapping arrays over using their negative indices, ... I would have to return the Array class back to normal afterwards). ... (comp.lang.ruby) - Re: is this class POD ?
... making the data public would result in the Array class ... > Though, I'd like to keep out from using C arrays in my interfaces, so ... IIUC, x is at offset 0 of xplusplus, but you may ... Will work Ok until you try copying your Array. ... (comp.lang.cpp) - [QUIZ] Newbie doubts about the quiz
... raised when I was trying to solve this quiz. ... I'm going to have this two-dimensional array representing the board. ... behavior of wrapping arrays over using their negative indices, ... I would have to return the Array class back to normal afterwards). ... (comp.lang.ruby) - Re: [QUIZ] Newbie doubts about the quiz
... raised when I was trying to solve this quiz. ... I'm going to have this two-dimensional array representing the board. ... behavior of wrapping arrays over using their negative indices, ... I would have to return the Array class back to normal afterwards). ... (comp.lang.ruby) - Re: Comparing Arrays (Sounds easy but I cant find it!)
... I thought this was the C# forum... ... "Since the Array class is the parent class of all arrays defined in C#, ... array created using C/C++ syntax has access to the methods defined in the ... (microsoft.public.dotnet.languages.csharp) |
|